cox.jmatt.java.MathTools.test
Class COFormatterFactory

java.lang.Object
  extended by cox.jmatt.java.MathTools.test.COFormatterFactory

public class COFormatterFactory
extends java.lang.Object

This class exists to create specific COFormatter instances. The Math ClassLoader can be enabled or not and, as with similar classes, the fully-qualified name of the class is required.


Constructor Summary
COFormatterFactory()
          Scripting constructor.
 
Method Summary
static COFormatter createFormatter(java.lang.String pName, boolean pUseMTCL)
          Static convenience method to create COFormatters.
 COFormatter getFormatter(java.lang.String pName)
          Create and return a COFormatter.
 void setMathClassLoader(boolean pEnable)
          Enable/disable the Math ClassLoader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

COFormatterFactory

public COFormatterFactory()
Scripting constructor.

Method Detail

setMathClassLoader

public void setMathClassLoader(boolean pEnable)
Enable/disable the Math ClassLoader. This method takes effect immediately, setting or clearing the Math Loader.

Parameters:
pEnable - true to use the Math ClassLoader, false to disable it.

getFormatter

public COFormatter getFormatter(java.lang.String pName)
Create and return a COFormatter. The full classname must be supplied otherwise this method returns null. Any errors are reported at Error level and the return value is null.

Parameters:
pName - The name of the COFormatter implementation to create.
Returns:
The proper instance or null if catastrophe strikes.

createFormatter

public static COFormatter createFormatter(java.lang.String pName,
                                          boolean pUseMTCL)
Static convenience method to create COFormatters. If an error occurs or the class cannot be created null is returned.

Parameters:
pName - The name of the COFormatter class to create.
pUseMTCL - true to use the Math ClassLoader, false not to.