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, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDescription, measureByteSizeprotected Options options
public String getPurposeString()
OptionHandlergetPurposeString in interface OptionHandlerpublic Options getOptions()
OptionHandlergetOptions in interface OptionHandlerpublic void prepareForUse()
OptionHandlerprepareForUse in interface OptionHandlerpublic void prepareForUse(TaskMonitor monitor, ObjectRepository repository)
OptionHandlerprepareForUse in interface OptionHandlermonitor - 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)
OptionHandlergetCLICreationString in interface OptionHandlerpublic OptionHandler copy()
MOAObjectcopy in interface MOAObjectcopy in interface OptionHandlercopy in class AbstractMOAObjectprotected 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.