Class JGrep.JGrepIClassLoader

  • Enclosing class:
    JGrep

    private class JGrep.JGrepIClassLoader
    extends IClassLoader
    A specialized IClassLoader that loads IClasses from the following sources:
    1. An already-parsed compilation unit
    2. A class file in the output directory (if existant and younger than source file)
    3. A source file in any of the source path directories
    4. The parent class loader
    Notice that the JGrep.JGrepIClassLoader is an inner class of JGrep and heavily uses JGrep's members.
    • Constructor Detail

      • JGrepIClassLoader

        public JGrepIClassLoader​(IClassLoader optionalParentIClassLoader)
        Parameters:
        optionalParentIClassLoader - The IClassLoader through which IClasses are to be loaded
    • Method Detail

      • findIClass

        protected IClass findIClass​(java.lang.String type)
        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
        Parameters:
        type - Field descriptor of the to load, e.g. "Lpkg1/pkg2/Outer$Inner;"
        Returns:
        null if a class with that descriptor could not be found