protected Set < String > loadPluginDelegators ( Scriptable cfg , String name ) { Set < String > result = null ; Object delegators = cfg . get ( name , cfg ) ; if ( delegators != Scriptable . NOT_FOUND && delegators instanceof Scriptable ) { result = new HashSet < String > ( ) ; for ( Object id : ( ( Scriptable ) delegators ) . getIds ( ) ) { if ( id instanceof Number ) { Number i = ( Number ) id ; Object entry = ( ( Scriptable ) delegators ) . get ( ( Integer ) i , ( Scriptable ) delegators ) ; result . add ( entry . toString ( ) ) ; } } result = Collections . unmodifiableSet ( result ) ; } else { result = Collections . emptySet ( ) ; } return result ; }
Common routine to load text or js plugin delegators