org.enhydra.xml.xmlc.autocomp
Class ResourceLoaderFactory
java.lang.Object
|
+--org.enhydra.xml.xmlc.autocomp.ResourceLoaderFactory
- public class ResourceLoaderFactory
- extends java.lang.Object
Factory for creating a ResourceLoader wrapper class for a particular class
loader. This takes a class loader class name and returns a instance
of the appropriate ResourceLoader.
The class is pre-configured with ResourceLoader mappings for the
following class loaders:
-
com.lutris.classloader.MultiClassLoader
-
org.apache.tomcat.util.NetworkClassLoader
- See Also:
ResourceLoader
,
MultiResourceLoader
,
TomcatResourceLoader
Method Summary |
static ResourceLoader |
create(java.lang.ClassLoader classLoader)
Create a ResourceLoader associated with a specified class loader. |
static void |
registerResourceLoader(java.lang.String classLoaderName,
java.lang.Class resourceLoaderClass)
Register a resource loader class for a class loader. |
static void |
registerResourceLoader(java.lang.String classLoaderName,
java.lang.String resourceLoaderName)
Register a resource loader class namefor a class loader. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
registerResourceLoader
public static void registerResourceLoader(java.lang.String classLoaderName,
java.lang.String resourceLoaderName)
- Register a resource loader class namefor a class loader.
- Parameters:
classLoaderName
- The class name of the class loader.resourceLoaderName
- The class name of the resource loader
It must implement ResourceLoader
and
contain a public constructor taking no arguments. This resource loader
must be loaded by the system class loader.- See Also:
ResourceLoader
registerResourceLoader
public static void registerResourceLoader(java.lang.String classLoaderName,
java.lang.Class resourceLoaderClass)
- Register a resource loader class for a class loader.
- Parameters:
classLoaderName
- The class name of the class loader.resourceLoaderClass
- The class for the resource loader.
It must implement ResourceLoader
and
contain a public constructor taking no arguments. This resource loader
can be loaded by any class loader.- See Also:
ResourceLoader
create
public static ResourceLoader create(java.lang.ClassLoader classLoader)
- Create a ResourceLoader associated with a specified class loader.
- Parameters:
classLoader
- The class loader to create a ResourceLoader for.
The ResourceLoader class must be registered with the factory.- Throws:
- XMLCAutoCompException - If there is no registered resource
loader or the resource loader can't be created.