cytoscape.visual.calculators
Class CalculatorFactory

java.lang.Object
  extended by cytoscape.visual.calculators.CalculatorFactory

public class CalculatorFactory
extends Object

This class provides a static factory method for constructing an instance of Calculator as specified by a Properties object and other arguments. It searches for a key-value pair identifying the name of the class to create, verifies that that class exists, implements the desired interface, and has an appropriate constructor, and calls that constructor with the appropriate arguments.


Constructor Summary
CalculatorFactory()
           
 
Method Summary
static Properties getProperties(Calculator c, String baseKey)
          Get a properties description of the caclulator argument.
static Calculator newCalculator(String name, Properties calcProps, String baseKey, String intClassName)
          Attempt to construct an instance of Calculator as defined by the supplied arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalculatorFactory

public CalculatorFactory()
Method Detail

newCalculator

public static Calculator newCalculator(String name,
                                       Properties calcProps,
                                       String baseKey,
                                       String intClassName)
Attempt to construct an instance of Calculator as defined by the supplied arguments.


getProperties

public static Properties getProperties(Calculator c,
                                       String baseKey)
Get a properties description of the caclulator argument. This method calls the getProperties method of the calculator and then adds a property giving the calculator class name as recognized by the newCalculator method.