org.hackystat.sensor.xmldata.option
Class OptionFactory

java.lang.Object
  extended by org.hackystat.sensor.xmldata.option.OptionFactory

public class OptionFactory
extends java.lang.Object

The class which follows the factory pattern to encapsulate the creation of options based on the specified parameters.

Author:
aito

Method Summary
static Option getInstance(XmlDataController controller, java.lang.String optionName, java.util.List<java.lang.String> parameters)
          Returns an option instance based on the specified option name and parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Option getInstance(XmlDataController controller,
                                 java.lang.String optionName,
                                 java.util.List<java.lang.String> parameters)
Returns an option instance based on the specified option name and parameters. If an option cannot be created, null is returned.

Parameters:
controller - the specified controller used to create an option.
optionName - the option name.
parameters - the option parameters.
Returns:
the option instance if it can be created, or null if an option instance cannot be created using the specified arguments.