public Object [ ] loadContextClasses ( ClassLoader loader , ContextClassEntry [ ] contextClasses ) throws Exception { if ( loader == null ) { throw new IllegalArgumentException ( "ClassLoader is null" ) ; } if ( contextClasses == null || contextClasses . length == 0 ) { throw new IllegalArgumentException ( "No Context Classes" ) ; } Vector < Class < ? > > classVector = new Vector < Class < ? > > ( contextClasses . length ) ; String [ ] prefixNames = new String [ contextClasses . length ] ; String className = null ; for ( int i = 0 ; i < contextClasses . length ; i ++ ) { className = contextClasses [ i ] . getContextClassName ( ) ; Class < ? > contextClass = loader . loadClass ( className ) ; classVector . addElement ( contextClass ) ; String prefixName = contextClasses [ i ] . getPrefixName ( ) ; if ( prefixName != null ) { prefixNames [ i ] = prefixName + "$" ; } else { prefixNames [ i ] = null ; } } Class < ? > [ ] classes = new Class < ? > [ classVector . size ( ) ] ; classVector . copyInto ( classes ) ; return new Object [ ] { classes , prefixNames } ; }
Loads and returns the runtime context classes specified by the ContextClassEntry array .