public static Collection < BaseStyler > findForCssName ( String cssName , boolean required ) throws ClassNotFoundException , IOException , InstantiationException , IllegalAccessException , NoSuchMethodException , InvocationTargetException { Collection < BaseStyler > stylers = new ArrayList <> ( 1 ) ; for ( Class < ? > c : ClassHelper . fromPackage ( Font . class . getPackage ( ) ) ) { if ( ! Modifier . isAbstract ( c . getModifiers ( ) ) && BaseStyler . class . isAssignableFrom ( c ) ) { BaseStyler bs = ( BaseStyler ) c . newInstance ( ) ; if ( bs . findForCssProperty ( cssName ) != null && ! bs . findForCssProperty ( cssName ) . isEmpty ( ) ) { stylers . add ( bs ) ; if ( LOGGER . isLoggable ( Level . FINE ) ) { LOGGER . fine ( String . format ( "found %s supporting css property %s" , cssName , bs . getClass ( ) . getName ( ) ) ) ; } } } } if ( stylers . isEmpty ( ) ) { if ( required ) { throw new IllegalArgumentException ( String . format ( "no styler supports css property %s" , cssName ) ) ; } else { LOGGER . warning ( String . format ( "no styler supports css property %s" , cssName ) ) ; } } return stylers ; }
find BaseStylers that implements a css property .