net.sf.saxon
Class Loader

java.lang.Object
  |
  +--net.sf.saxon.Loader

public class Loader
extends java.lang.Object

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


Constructor Summary
Loader()
           
 
Method Summary
static java.lang.Class getClass(java.lang.String className, boolean tracing)
          Load a class using the class name provided.
static java.lang.Object getInstance(java.lang.String className)
          Instantiate a class using the class name provided.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Loader

public Loader()
Method Detail

getClass

public static java.lang.Class getClass(java.lang.String className,
                                       boolean tracing)
                                throws XPathException
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.
Throws:
XPathException - if the class cannot be loaded.

getInstance

public static java.lang.Object getInstance(java.lang.String className)
                                    throws XPathException
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.
Throws:
XPathException - if the class cannot be loaded.