com.rubecula.darwin.expressions
Class EvaluatorFactory

java.lang.Object
  extended by com.rubecula.darwin.expressions.EvaluatorFactory

public class EvaluatorFactory
extends Object

Singleton class with class method to instantiate a new Evaluator

Author:
Robin TODO consider adding a makeEvaluator_StringBoolean method.
See Also:
getInstance()

Method Summary
 Object clone()
          Implmentation of clone() which always throws a CloneNotSupportedException.
static EvaluatorFactory getInstance()
          Class method to get the (singleton) instance of EvaluatorFactory.
 Evaluator makeEvaluator_String(String className, String string)
          Instantiate a new implementer of Evaluator from the class called className, providing one parameter to the constructor: string.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static EvaluatorFactory getInstance()
Class method to get the (singleton) instance of EvaluatorFactory.

Returns:
the singleton instance of EvaluatorFactory.

clone

public Object clone()
             throws CloneNotSupportedException
Implmentation of clone() which always throws a CloneNotSupportedException. This is really a belt-and-braces approach - but this, combine with the private constructor, absolutely ensures that there can never be another instance of EvaluatorFactory alive in the same JVM!

Overrides:
clone in class Object
Throws:
CloneNotSupportedException
See Also:
Object.clone()

makeEvaluator_String

public Evaluator makeEvaluator_String(String className,
                                      String string)
Instantiate a new implementer of Evaluator from the class called className, providing one parameter to the constructor: string.

Parameters:
className - the full name of the class to be instantiated
string - the parameter to pass to the constructor.
Returns:
a new instance of Evaluator