Interface ClassInfoLoader

All Known Implementing Classes:
ClassFileLoader, JarFileCommitter

public interface ClassInfoLoader
ClassInfoLoader provides an interface for loading classes. Implementing classes can load classes from a file, from the JVM, or elsewhere.
  • Method Details

    • loadClass

      ClassInfo loadClass(String name) throws ClassNotFoundException
      Load a class.
      Parameters:
      name - The name of the class to load, including the package name.
      Returns:
      A ClassInfo for the class.
      Throws:
      ClassNotFoundException - The class cannot be found in the class path.
      See Also:
    • newClass

      ClassInfo newClass(int modifiers, int classIndex, int superClassIndex, int[] interfaceIndexes, List constants)
      Creates a new class or interface.
      Parameters:
      modifiers - The modifiers describing the newly-created class
      classIndex - The index of the name of the newly-created class in its constant pool
      superClassIndex - The index of the name of the newly-created class's superclass in its constant pool
      interfaceIndexes - The indexes of the names of the interfaces that the newly-created class implements
      constants - The constant pool for the newly created class (a list of Constants).
    • outputStreamFor

      OutputStream outputStreamFor(ClassInfo info) throws IOException
      Returns an OutputStream to which a class should be written.
      Throws:
      IOException