Package javassist

Class DirClassPath

java.lang.Object
javassist.DirClassPath
All Implemented Interfaces:
ClassPath

final class DirClassPath extends Object implements ClassPath
  • Field Details

  • Constructor Details

    • DirClassPath

      DirClassPath(String dirName)
  • Method Details

    • openClassfile

      public InputStream openClassfile(String classname)
      Description copied from interface: ClassPath
      Opens a class file. This method may be called just to examine whether the class file exists as well as to read the contents of the file.

      This method can return null if the specified class file is not found. If null is returned, the next search path is examined. However, if an error happens, this method must throw an exception so that the search will be terminated.

      This method should not modify the contents of the class file.

      Specified by:
      openClassfile in interface ClassPath
      Parameters:
      classname - a fully-qualified class name
      Returns:
      the input stream for reading a class file
      See Also:
    • find

      public URL find(String classname)
      Description copied from interface: ClassPath
      Returns the uniform resource locator (URL) of the class file with the specified name.
      Specified by:
      find in interface ClassPath
      Parameters:
      classname - a fully-qualified class name.
      Returns:
      null if the specified class file could not be found.
    • toString

      public String toString()
      Overrides:
      toString in class Object