Documentation of 'jas2.loader.ClassPathLoader' Java class
ClassPathLoader
jas2.loader

Class ClassPathLoader

  • Direct Known Subclasses:
    DelegateLoader


    public class ClassPathLoader
    extends java.lang.ClassLoader
    • Constructor Summary

      Constructors 
      Constructor and Description
      ClassPathLoader(ClassPath path, java.lang.String name)
      A ClassLoader that loads from a ClassPath
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      ClassPath getClassPath() 
      java.net.URL getResource(java.lang.String name)
      This cannot easily be implemented under JDK 1.1 (we would have to install our own java.net.URLStreamHandlerFactory but only one is allowed per application so this would not be very modular).
      java.io.InputStream getResourceAsStream(java.lang.String name) 
      java.lang.Class loadClass(java.lang.String name, boolean resolve) 
      byte[] loadClassData(java.lang.String theClassName) 
      • Methods inherited from class java.lang.ClassLoader

        clearAssertionStatus, getParent, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ClassPathLoader

        public ClassPathLoader(ClassPath path,
                               java.lang.String name)
        A ClassLoader that loads from a ClassPath
        Parameters:
        path - The path to load from
        name - The name of the class loader (just for debugging)
    • Method Detail

      • getClassPath

        public ClassPath getClassPath()
      • loadClass

        public java.lang.Class loadClass(java.lang.String name,
                                         boolean resolve)
                                  throws java.lang.ClassNotFoundException
        Overrides:
        loadClass in class java.lang.ClassLoader
        Throws:
        java.lang.ClassNotFoundException
      • getResource

        public java.net.URL getResource(java.lang.String name)
        This cannot easily be implemented under JDK 1.1 (we would have to install our own java.net.URLStreamHandlerFactory but only one is allowed per application so this would not be very modular). JDK 1.1 supports the jar: protocol for reading entries within JAR files, so this will be easy to implement then.
        Overrides:
        getResource in class java.lang.ClassLoader
      • getResourceAsStream

        public java.io.InputStream getResourceAsStream(java.lang.String name)
        Overrides:
        getResourceAsStream in class java.lang.ClassLoader
      • loadClassData

        public byte[] loadClassData(java.lang.String theClassName)
                             throws java.lang.ClassNotFoundException
        Throws:
        java.lang.ClassNotFoundException

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.