public abstract class AbstractOptionHandler extends AbstractMOAObject implements OptionHandler
Modifier and Type | Field and Description |
---|---|
protected Map<String,Object> |
classOptionNamesToPreparedObjects
Dictionary with option texts and objects
|
protected Options |
options
Options to handle
|
Constructor and Description |
---|
AbstractOptionHandler() |
Modifier and Type | Method and Description |
---|---|
OptionHandler |
copy()
This method produces a copy of this object.
|
protected Option[] |
discoverOptionsViaReflection()
Gets the options of this class via reflection.
|
String |
getCLICreationString(Class<?> expectedType)
Gets the Command Line Interface text to create the object
|
Options |
getOptions()
Gets the options of this object
|
protected Object |
getPreparedClassOption(ClassOption opt)
Gets a prepared option of this class.
|
protected Object |
getPreparedClassOption(ClassOptionWithNames opt)
Gets a prepared option of this class.
|
String |
getPurposeString()
Gets the purpose of this object
|
protected void |
prepareClassOptions(TaskMonitor monitor,
ObjectRepository repository)
Prepares the options of this class.
|
void |
prepareForUse()
This method prepares this object for use.
|
void |
prepareForUse(TaskMonitor monitor,
ObjectRepository repository)
This method prepares this object for use.
|
protected abstract void |
prepareForUseImpl(TaskMonitor monitor,
ObjectRepository repository)
This method describes the implementation of how to prepare this object for use.
|
copy, measureByteSize, measureByteSize, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDescription, measureByteSize
protected Options options
public String getPurposeString()
OptionHandler
getPurposeString
in interface OptionHandler
public Options getOptions()
OptionHandler
getOptions
in interface OptionHandler
public void prepareForUse()
OptionHandler
prepareForUse
in interface OptionHandler
public void prepareForUse(TaskMonitor monitor, ObjectRepository repository)
OptionHandler
prepareForUse
in interface OptionHandler
monitor
- the TaskMonitor to userepository
- the ObjectRepository to useprotected abstract void prepareForUseImpl(TaskMonitor monitor, ObjectRepository repository)
prepareForUseImpl
and not prepareForUse
since
prepareForUse
calls prepareForUseImpl
.monitor
- the TaskMonitor to userepository
- the ObjectRepository to usepublic String getCLICreationString(Class<?> expectedType)
OptionHandler
getCLICreationString
in interface OptionHandler
public OptionHandler copy()
MOAObject
copy
in interface MOAObject
copy
in interface OptionHandler
copy
in class AbstractMOAObject
protected Option[] discoverOptionsViaReflection()
protected void prepareClassOptions(TaskMonitor monitor, ObjectRepository repository)
monitor
- the TaskMonitor to userepository
- the ObjectRepository to useprotected Object getPreparedClassOption(ClassOption opt)
opt
- the class option to getprotected Object getPreparedClassOption(ClassOptionWithNames opt)
opt
- - ClassOptionWithNamesCopyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.