com.icl.saxon

Class Loader

public class Loader extends Object

Loader is used to load a class given its name. The implementation varies in different Java environments.

Author: Michael H. Kay

Method Summary
static ClassgetClass(String className)
Load a class using the class name provided.
Note that the method does not check that the object is of the right class.
static ObjectgetInstance(String className)
Instantiate a class using the class name provided.
Note that the method does not check that the object is of the right class.
static voidsetTracing(boolean onOrOff)
Switch tracing on or off

Method Detail

getClass

public static Class getClass(String className)
Load a class using the class name provided.
Note that the method does not check that the object is of the right class.

Parameters: className A string containing the name of the class, for example "com.microstar.sax.LarkDriver"

Returns: an instance of the class named, or null if it is not loadable.

UNKNOWN: an exception if the class cannot be loaded.

getInstance

public static Object getInstance(String className)
Instantiate a class using the class name provided.
Note that the method does not check that the object is of the right class.

Parameters: className A string containing the name of the class, for example "com.microstar.sax.LarkDriver"

Returns: an instance of the class named, or null if it is not loadable.

UNKNOWN: an exception if the class cannot be loaded.

setTracing

public static void setTracing(boolean onOrOff)
Switch tracing on or off