|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cayenne.conf.ClasspathResourceFinder
public class ClasspathResourceFinder
A ResourceFinder that looks up resources in the classpath.
| Field Summary | |
|---|---|
protected ClassLoader |
classLoader
|
protected Collection<String> |
rootPaths
|
| Constructor Summary | |
|---|---|
ClasspathResourceFinder()
|
|
| Method Summary | |
|---|---|
void |
addRootPath(String path)
Adds a base path to be used for resource lookup. |
ClassLoader |
getClassLoader()
Returns ClassLoader override initialized via setClassLoader(ClassLoader). |
URL |
getResource(String name)
Returns a single resource matching a given name. |
protected ClassLoader |
getResourceClassLoader()
Returns a non-null ClassLoader that should be used to locate resources. |
Collection<URL> |
getResources(String name)
Returns a collection of resource URLs with a given name found in the environment using some lookup strategy. |
void |
setClassLoader(ClassLoader classLoader)
Sets an overriding ClassLoader for this resource finder. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ClassLoader classLoader
protected Collection<String> rootPaths
| Constructor Detail |
|---|
public ClasspathResourceFinder()
| Method Detail |
|---|
public URL getResource(String name)
ResourceFinder
getResource in interface ResourceFinderpublic Collection<URL> getResources(String name)
ResourceFinder
getResources in interface ResourceFinderpublic void addRootPath(String path)
public ClassLoader getClassLoader()
setClassLoader(ClassLoader).
Null by default.
public void setClassLoader(ClassLoader classLoader)
protected ClassLoader getResourceClassLoader()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||