Enhydra 3.0.3 API

org.enhydra.xml.xmlc.autocomp
Interface ResourceLoader


public interface ResourceLoader

Interface for object that is used to load the primary classes and find the source files. This provides methods for loading a class that are not found in the default classLoader interface. This is necessary as this This is not used to load the delegate classes. The lookup of File objects is cached by the caller, so there is no need to do caching in implementations of this interface.


Method Summary
 java.io.File getClassFile(java.lang.Class classObj)
          Get a File object associated with a class.
 java.lang.ClassLoader getClassLoader()
          Get the class loader associated with this resource loader.
 java.net.URL[] getClassPath()
          Get the class path associate with this resource loader.
 java.io.File getResourceFile(java.lang.String name)
          Get a File object associated with a resource.
 java.net.URL[] getSystemClassPath()
          Get the system class path.
 java.lang.Class loadClass(java.lang.String className)
          Load the specified class.
 void setClassLoader(java.lang.ClassLoader loader)
          Set the class loader this class is associated with.
 

Method Detail

setClassLoader

public void setClassLoader(java.lang.ClassLoader loader)
Set the class loader this class is associated with.

getClassPath

public java.net.URL[] getClassPath()
Get the class path associate with this resource loader.

getSystemClassPath

public java.net.URL[] getSystemClassPath()
Get the system class path.

getClassLoader

public java.lang.ClassLoader getClassLoader()
Get the class loader associated with this resource loader.

getClassFile

public java.io.File getClassFile(java.lang.Class classObj)
                          throws java.lang.ClassNotFoundException
Get a File object associated with a class.

getResourceFile

public java.io.File getResourceFile(java.lang.String name)
                             throws java.lang.ClassNotFoundException
Get a File object associated with a resource.

loadClass

public java.lang.Class loadClass(java.lang.String className)
                          throws java.lang.ClassNotFoundException
Load the specified class.
Throws:
java.lang.ClassNotFoundException - if the class could not be load.

Enhydra 3.0.3 API