package saker.util.classloader
ClassLoaderDataFinder implementation that supports retrieving resources from a subdirectory.
All resource retrieving functions in this class will be forwarded to an appropriate subject ( ClassLoader or ClassLoaderDataFinder) with the resource path prepended with the subdirectory.
Use the static create(
public static SubDirectoryClassLoaderDataFinder | create( Creates a new instance that forwards its resource retrievel requests to the given class loader. |
public static SubDirectoryClassLoaderDataFinder | create( Creates a new instance that forwards its resource retrieval requests to the given data finder. |
public String | Gets the subdirectory that this data finder uses. |
From: Object |
From: ClassLoaderDataFinder |
public static SubDirectoryClassLoaderDataFinder create(String subdirectory, ClassLoader classLoader) throws NullPointerException
Creates a new instance that forwards its resource retrievel requests to the given class loader.
The argument subdirectory is normalized, all backslash ('\\'
) characters will be replaced with a
forward slash ('/'
). The subdirectory argument may end with a slash character, but not required.
subdirectoryThe subdirectory to use.
classLoaderThe class loader to forward the resource retrieval requests to.
The created data finder.
NullPointerExceptionIf any of the arguments are
null
.public static SubDirectoryClassLoaderDataFinder create(String subdirectory, ClassLoaderDataFinder finder) throws NullPointerException
Creates a new instance that forwards its resource retrieval requests to the given data finder.
The argument subdirectory is normalized, all backslash ('\\'
) characters will be replaced with a
forward slash ('/'
). The subdirectory argument may end with a slash character, but not required.
subdirectoryThe subdirectory to use.
finderThe finder to forward the resource retrieval requests to.
The created data finder.
NullPointerExceptionIf any of the arguments are
null
.Gets the subdirectory that this data finder uses.
The subdirectory.