{
return oParentClassLoader;
}
else
{
ReloadingClassLoader oClassLoader = new ReloadingClassLoader( oParentClassLoader );
// we will ignore any dependencies for classes in any of the following packages
oClassLoader.addIgnoredClassNamePrefix( "java." );
oClassLoader.addIgnoredClassNamePrefix( "javax." );
oClassLoader.addIgnoredClassNamePrefix( "com.acciente." );
// if there is a classpath defined setup a reloading classloader to handle the specified directories
for ( int i = 0; i < oJavaClassPathConfig.getDirList().size(); i++ )
{
if ( oJavaClassPathConfig.getDirList().get( i ) instanceof Config.JavaClassPath.CompiledDir )
{
Config.JavaClassPath.CompiledDir oCompiledDir = ( Config.JavaClassPath.CompiledDir ) oJavaClassPathConfig.getDirList().get( i );
oLog.info( "configuring reloading classloader for compiled classes in: " + oCompiledDir.getDir() );
// set up a compiled class definition loader
JavaCompiledClassDefLoader oJavaCompiledClassDefLoader = new JavaCompiledClassDefLoader();
oJavaCompiledClassDefLoader.setCompiledDirectory( oCompiledDir.getDir() );
oJavaCompiledClassDefLoader.setPackageNamePrefix( oCompiledDir.getPackageNamePrefix() );
// add the class def loader to the search list
oClassLoader.addClassDefLoader( oJavaCompiledClassDefLoader );
}
}
return oClassLoader;
}