类 CustomizedLoaderClassPath

  • 所有已实现的接口:
    javassist.ClassPath

    public class CustomizedLoaderClassPath
    extends Object
    implements javassist.ClassPath
    A class search-path representing a class loader.

    It is used for obtaining a class file from the given class loader by getResourceAsStream(). The LoaderClassPath refers to the class loader through WeakReference. If the class loader is garbage collected, the other search pathes are examined.

    The given class loader must have both getResourceAsStream() and getResource().

    作者:
    Bill Burke, Shigeru Chiba
    • 构造器详细资料

      • CustomizedLoaderClassPath

        public CustomizedLoaderClassPath​(ClassLoader cl)
        Creates a search path representing a class loader.
    • 方法详细资料

      • openClassfile

        public InputStream openClassfile​(String classname)
        Obtains a class file from the class loader. This method calls getResourceAsStream(String) on the class loader.
        指定者:
        openClassfile 在接口中 javassist.ClassPath
      • find

        public URL find​(String classname)
        Obtains the URL of the specified class file. This method calls getResource(String) on the class loader.
        指定者:
        find 在接口中 javassist.ClassPath
        返回:
        null if the class file could not be found.
      • close

        public void close()
        Closes this class path.