org.apache.jdo.impl.enhancer.util
Class PathResourceLocator
java.lang.Object
org.apache.jdo.impl.enhancer.util.Assertion
org.apache.jdo.impl.enhancer.util.Support
org.apache.jdo.impl.enhancer.util.ResourceLocatorBase
org.apache.jdo.impl.enhancer.util.PathResourceLocator
- All Implemented Interfaces:
- ResourceLocator
- public class PathResourceLocator
- extends ResourceLocatorBase
- implements ResourceLocator
Searches resources within a path.
Field Summary |
private java.net.URLClassLoader |
classLoader
The class loader for loading jdo resources. |
protected java.io.PrintWriter |
out
|
protected boolean |
verbose
|
Fields inherited from class org.apache.jdo.impl.enhancer.util.Support |
timer |
Constructor Summary |
PathResourceLocator(java.io.PrintWriter out,
boolean verbose,
java.lang.String path)
Creates an instance. |
Method Summary |
java.net.URLClassLoader |
getClassLoader()
Returns a classloader initialized on the path provided to constructor. |
java.io.InputStream |
getInputStreamForResource(java.lang.String resourceName)
Finds a resource with a given name. |
void |
printMessage(java.lang.String msg)
Prints out a verbose message. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
classLoader
private final java.net.URLClassLoader classLoader
- The class loader for loading jdo resources.
out
protected final java.io.PrintWriter out
verbose
protected final boolean verbose
PathResourceLocator
public PathResourceLocator(java.io.PrintWriter out,
boolean verbose,
java.lang.String path)
throws java.io.IOException
- Creates an instance.
getClassLoader
public java.net.URLClassLoader getClassLoader()
- Returns a classloader initialized on the path provided to constructor.
getInputStreamForResource
public java.io.InputStream getInputStreamForResource(java.lang.String resourceName)
- Finds a resource with a given name.
- Specified by:
getInputStreamForResource
in interface ResourceLocator
printMessage
public void printMessage(java.lang.String msg)
- Prints out a verbose message.
- Parameters:
msg
- the message