com.caucho.loader
Class ResourceLoader

java.lang.Object
  extended by com.caucho.loader.Loader
      extended by com.caucho.loader.ResourceLoader

public class ResourceLoader
extends Loader

Class loader specific to loading resources, not classes.


Field Summary
 
Fields inherited from class com.caucho.loader.Loader
log
 
Constructor Summary
ResourceLoader()
          Null constructor for the resource loader.
ResourceLoader(java.lang.ClassLoader loader)
           
ResourceLoader(DynamicClassLoader loader, Path path)
          Creates the resource loader with the specified path.
 
Method Summary
protected  ClassEntry getClassEntry(java.lang.String name, java.lang.String pathName)
          The class entry is always null.
 Path getPath()
          Gets the resource path.
 Path getPath(java.lang.String name)
          Given a class or resource name, returns a patch to that resource.
 void setPath(Path path)
          Sets the resource directory.
 java.lang.String toString()
          Returns a printable representation of the loader.
 
Methods inherited from class com.caucho.loader.Loader
buildClassPath, buildSourcePath, destroy, getClassLoader, getCodeSource, getResource, getResourceAsStream, getResources, init, isDirectoryLoader, loadClass, setLoader, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceLoader

public ResourceLoader()
Null constructor for the resource loader.


ResourceLoader

public ResourceLoader(java.lang.ClassLoader loader)

ResourceLoader

public ResourceLoader(DynamicClassLoader loader,
                      Path path)
Creates the resource loader with the specified path.

Parameters:
path - specifying the root of the resources
Method Detail

setPath

public void setPath(Path path)
Sets the resource directory.


getPath

public Path getPath()
Gets the resource path.


getPath

public Path getPath(java.lang.String name)
Given a class or resource name, returns a patch to that resource.

Overrides:
getPath in class Loader
Parameters:
name - the class or resource name.
Returns:
the path representing the class or resource.

getClassEntry

protected ClassEntry getClassEntry(java.lang.String name,
                                   java.lang.String pathName)
                            throws java.lang.ClassNotFoundException
The class entry is always null.

Overrides:
getClassEntry in class Loader
Parameters:
name - name of the class
Throws:
java.lang.ClassNotFoundException

toString

public java.lang.String toString()
Returns a printable representation of the loader.

Overrides:
toString in class java.lang.Object