Class ReflectionPlume.PromiscuousLoader

java.lang.Object
java.lang.ClassLoader
org.plumelib.reflection.ReflectionPlume.PromiscuousLoader
Enclosing class:
ReflectionPlume

private static class ReflectionPlume.PromiscuousLoader extends ClassLoader
This static nested class has no purpose but to define defineClassFromFile. ClassLoader.defineClass is protected, so I subclass ClassLoader in order to call defineClass.
  • Constructor Details

    • PromiscuousLoader

      private PromiscuousLoader()
  • Method Details

    • defineClassFromFile

      public Class<?> defineClassFromFile(@BinaryName String className, String pathname) throws FileNotFoundException, IOException
      Converts the bytes in a file into an instance of class Class, and also resolves (links) the class. Delegates the real work to defineClass.
      Parameters:
      className - the expected binary name of the class to define, or null if not known
      pathname - the file from which to load the class
      Returns:
      the Class object that was created
      Throws:
      FileNotFoundException - if the file does not exist
      IOException - if there is trouble reading the file
      See Also: