Class ClassLoaderIClassLoader

java.lang.Object
org.codehaus.janino.IClassLoader
org.codehaus.janino.ClassLoaderIClassLoader

public class ClassLoaderIClassLoader extends IClassLoader
An IClassLoader that loads IClasses through a reflection ClassLoader.
  • Constructor Details

    • ClassLoaderIClassLoader

      public ClassLoaderIClassLoader(ClassLoader classLoader)
      Parameters:
      classLoader - The delegate that loads the classes.
    • ClassLoaderIClassLoader

      public ClassLoaderIClassLoader()
      Equivalent to
         ClassLoaderIClassLoader(Thread.currentThread().getContextClassLoader())
       
  • Method Details

    • getClassLoader

      public ClassLoader getClassLoader()
      Returns:
      The delegate ClassLoader
    • findIClass

      protected IClass findIClass(String descriptor) throws ClassNotFoundException
      Description copied from class: IClassLoader
      Find a new IClass by descriptor; return null if a class for that descriptor could not be found.

      Similar ClassLoader.findClass(java.lang.String), this method must

      The format of a descriptor is defined in JVMS 4.3.2. Typical descriptors are:

      • I (Integer)
      • Lpkg1/pkg2/Cls; (Class declared in package)
      • Lpkg1/pkg2/Outer$Inner; Member class
      Notice that this method is never called for array types.

      Notice that this method is never called from more than one thread at a time. In other words, implementations of this method need not be synchronized.

      Specified by:
      findIClass in class IClassLoader
      Returns:
      null if a class with that descriptor could not be found
      Throws:
      ClassNotFoundException - if an exception was raised while loading the class