Package com.acciente.commons.loader

Examples of com.acciente.commons.loader.ReloadingClassLoader


      {
         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;
      }
View Full Code Here

TOP

Related Classes of com.acciente.commons.loader.ReloadingClassLoader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.