net.sf.saxon.trans
public class DynamicLoader extends Object
Method Summary | |
---|---|
Class | getClass(String className, boolean tracing, ClassLoader classLoader)
Load a class using the class name provided.
|
ClassLoader | getClassLoader()
Get the ClassLoader supplied using the method DynamicLoader.
|
Object | getInstance(String className, ClassLoader classLoader)
Instantiate a class using the class name provided.
|
Object | getInstance(String className, boolean tracing, 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.
|
void | setClassLoader(ClassLoader loader)
Set a ClassLoader to be used when loading external classes. |
This method is intended for internal use only.
Parameters: className A string containing the name of the class, for example "com.microstar.sax.LarkDriver" tracing true if diagnostic tracing is required classLoader The ClassLoader to be used to load the class. If this is null, then the classLoader used will be the first one available of: the classLoader registered with the Configuration using DynamicLoader; the context class loader for the current thread; or failing that, the class loader invoked implicitly by a call of Class.forName() (which is the ClassLoader that was used to load the Configuration object itself).
Returns: an instance of the class named, or null if it is not loadable.
Throws: XPathException if the class cannot be loaded.
Returns: the ClassLoader used in this configuration
This method is intended for internal use only.
Parameters: 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 classLoader used will be the first one available of: the classLoader registered with the Configuration using DynamicLoader; the context class loader for the current thread; or failing that, the class loader invoked implicitly by a call of Class.forName() (which is the ClassLoader that was used to load the Configuration object itself).
Returns: an instance of the class named, or null if it is not loadable.
Throws: XPathException if the class cannot be loaded.
This method is intended for internal use only.
Parameters: className A string containing the name of the class, for example "com.microstar.sax.LarkDriver" tracing true if attempts to load classes are to be traced to the console classLoader The ClassLoader to be used to load the class. If this is null, then the classLoader used will be the first one available of: the classLoader registered with the Configuration using DynamicLoader; the context class loader for the current thread; or failing that, the class loader invoked implicitly by a call of Class.forName() (which is the ClassLoader that was used to load the Configuration object itself).
Returns: an instance of the class named, or null if it is not loadable.
Throws: XPathException if the class cannot be loaded.
Parameters: loader the ClassLoader to be used in this configuration