public void define ( ) { staticInitializer = null ; haveLookedForStaticInitializer = false ; // DEFAULT METHODS - remove the if if ( ! typeDescriptor . isInterface ( ) ) { try { dispatcherClass = reloadableType . typeRegistry . defineClass ( dispatcherName , dispatcher , false ) ; } catch ( RuntimeException t ) { // TODO check for something strange. something to do with the file detection misbehaving, see the same file attempted to be reloaded twice... if ( t . getMessage ( ) . indexOf ( "duplicate class definition" ) == - 1 ) { throw t ; } else { t . printStackTrace ( ) ; } } } try { executorClass = reloadableType . typeRegistry . defineClass ( executorName , executor , false ) ; } catch ( RuntimeException t ) { // TODO check for something strange. something to do with the file detection misbehaving, see the same file attempted to be reloaded twice... if ( t . getMessage ( ) . indexOf ( "duplicate class definition" ) == - 1 ) { throw t ; } else { t . printStackTrace ( ) ; } } // DEFAULT METHODS - remove the if if ( ! typeDescriptor . isInterface ( ) ) { try { dispatcherInstance = dispatcherClass . newInstance ( ) ; } catch ( InstantiationException e ) { throw new RuntimeException ( "Unable to build dispatcher class instance" , e ) ; } catch ( IllegalAccessException e ) { throw new RuntimeException ( "Unable to build dispatcher class instance" , e ) ; } } }
Defines this version . Called up front but can also be called later if the ChildClassLoader in a type registry is discarded and recreated .