Class ConfigurableClassLoader.ClassDirectory

java.lang.Object
eu.bandm.tools.util.classes.ConfigurableClassLoader.ClassSource
eu.bandm.tools.util.classes.ConfigurableClassLoader.ClassDirectory
Enclosing class:
ConfigurableClassLoader

public class ConfigurableClassLoader.ClassDirectory extends ConfigurableClassLoader.ClassSource
Directory in the file system from which a class can be loaded.
  • Field Details

    • root

      protected final File root
      The file system point starting from which this class loader will resolve class names.
  • Constructor Details

    • ClassDirectory

      public ClassDirectory(File root)
      Only constructor, sets the file system point from which this class loader will resolve class names.
  • Method Details

    • openClass

      protected InputStream openClass(String name) throws IOException
      Return an input stream which contains all data of the class with the given name.
      Specified by:
      openClass in class ConfigurableClassLoader.ClassSource
      Parameters:
      name - the binary class name to be loaded by this class loader
      Throws:
      IOException - if no file corresponding to the class name can be found.
    • toString

      public String toString()
      Return the string representation of the start file of this classloader.
      Overrides:
      toString in class Object
    • toPhysicalName

      protected String toPhysicalName(String name)
      Convert a class name to the file name valid relative to this class loader.