public static Banner getCasBannerInstance ( ) { val packageName = CasEmbeddedContainerUtils . class . getPackage ( ) . getName ( ) ; val reflections = new Reflections ( new ConfigurationBuilder ( ) . filterInputsBy ( new FilterBuilder ( ) . includePackage ( packageName ) ) . setUrls ( ClasspathHelper . forPackage ( packageName ) ) . setScanners ( new SubTypesScanner ( true ) ) ) ; val subTypes = reflections . getSubTypesOf ( AbstractCasBanner . class ) ; subTypes . remove ( DefaultCasBanner . class ) ; if ( subTypes . isEmpty ( ) ) { return new DefaultCasBanner ( ) ; } try { val clz = subTypes . iterator ( ) . next ( ) ; return clz . getDeclaredConstructor ( ) . newInstance ( ) ; } catch ( final Exception e ) { LOGGER . error ( e . getMessage ( ) , e ) ; } return new DefaultCasBanner ( ) ; }
Gets cas banner instance .