|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.trinidad.resource.ResourceLoader
org.apache.myfaces.trinidad.resource.ClassLoaderResourceLoader
public class ClassLoaderResourceLoader
A resource loader implementation which loads resources using the context class loader. The returned resource URL will be null for paths that attempt to access paths outside the root directory by having ".." in the path.
Constructor Summary | |
---|---|
ClassLoaderResourceLoader()
Constructs a new root ClassLoaderResourceLoader. |
|
ClassLoaderResourceLoader(ResourceLoader parent)
Constructs a new ClassLoaderResourceLoader with specified parent. |
|
ClassLoaderResourceLoader(String rootPackage)
Constructs a new root ClassLoaderResourceLoader with specified top level resource package. |
|
ClassLoaderResourceLoader(String rootPackage,
ResourceLoader parent)
Constructs a new root ClassLoaderResourceLoader with specified top level resource package and parent resource loader. |
Method Summary | |
---|---|
protected URL |
findResource(String path)
Finds the resource with the given name. |
protected ClassLoader |
getClassLoader()
Returns the ClassLoader to use when looking up resources under the top level package. |
Methods inherited from class org.apache.myfaces.trinidad.resource.ResourceLoader |
---|
getContentType, getContentType, getNullResourceLoader, getParent, getResource, isCachable, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ClassLoaderResourceLoader()
public ClassLoaderResourceLoader(ResourceLoader parent)
parent
- the parent resource loaderpublic ClassLoaderResourceLoader(String rootPackage)
rootPackage
- the top level package used to interpret resource paths
For example, it could be "META-INF".public ClassLoaderResourceLoader(String rootPackage, ResourceLoader parent)
rootPackage
- the top level package used to interpret resource pathsparent
- the parent resource loaderMethod Detail |
---|
protected URL findResource(String path) throws IOException
ResourceLoader
findResource
in class ResourceLoader
path
- The resource name
IOException
protected ClassLoader getClassLoader()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |