public interface IDynamicLoader
Modifier and Type | Method and Description |
---|---|
java.lang.Class<?> |
getClass(java.lang.String className,
Logger traceOut,
java.lang.ClassLoader classLoader)
Load a class using the class name provided.
|
java.lang.Object |
getInstance(java.lang.String className,
java.lang.ClassLoader classLoader)
Instantiate a class using the class name provided.
|
java.lang.Object |
getInstance(java.lang.String className,
Logger traceOut,
java.lang.ClassLoader classLoader)
Instantiate a class using the class name provided, with the option of tracing
Note that the method does not check that the object is of the right class.
|
java.io.InputStream |
getResourceAsStream(java.lang.String name)
Get a resource from a supplied URI using the classpath URI scheme.
|
void |
setClassLoader(java.lang.ClassLoader classLoader)
Set the ClassLoader to be used
|
void setClassLoader(java.lang.ClassLoader classLoader)
classLoader
- the ClassLoader to be usedjava.lang.Class<?> getClass(java.lang.String className, Logger traceOut, java.lang.ClassLoader classLoader) throws XPathException
This method is intended for internal use only.
className
- A string containing the name of the
class, for example "com.microstar.sax.LarkDriver"traceOut
- if diagnostic tracing is required, the destination for the output; otherwise nullclassLoader
- The ClassLoader to be used to load the class. If this is null, then
the implementation uses its own class loader.XPathException
- if the class cannot be loaded.java.lang.Object getInstance(java.lang.String className, java.lang.ClassLoader classLoader) throws XPathException
This method is intended for internal use only.
className
- A string containing the name of the
class, for example "com.microstar.sax.LarkDriver"classLoader
- The ClassLoader to be used to load the class. If this is null, then
the implementation uses its own class loader.XPathException
- if the class cannot be loaded.java.lang.Object getInstance(java.lang.String className, Logger traceOut, java.lang.ClassLoader classLoader) throws XPathException
This method is intended for internal use only.
className
- A string containing the name of the
class, for example "com.microstar.sax.LarkDriver"traceOut
- if attempts to load classes are to be traced, then the destination
for the trace output; otherwise nullclassLoader
- The ClassLoader to be used to load the class. If this is null, then
the implementation uses its own choice of ClassLoaderXPathException
- if the class cannot be loaded.java.io.InputStream getResourceAsStream(java.lang.String name)
name
- the path name from the URICopyright (c) 2004-2022 Saxonica Limited. All rights reserved.