public abstract class AbstractTask extends AbstractOptionHandler implements Task
classOptionNamesToPreparedObjects, options
Constructor and Description |
---|
AbstractTask() |
Modifier and Type | Method and Description |
---|---|
Object |
doTask()
This method performs this task,
when TaskMonitor and ObjectRepository are no needed.
|
Object |
doTask(TaskMonitor monitor,
ObjectRepository repository)
This method performs this task.
|
protected abstract Object |
doTaskImpl(TaskMonitor monitor,
ObjectRepository repository)
This method performs this task.
|
void |
getDescription(StringBuilder sb,
int indent)
Returns a string representation of this object.
|
String |
getTaskName()
Gets the name of this task.
|
protected void |
prepareForUseImpl(TaskMonitor monitor,
ObjectRepository repository)
This method describes the implementation of how to prepare this object for use.
|
copy, discoverOptionsViaReflection, getCLICreationString, getOptions, getPreparedClassOption, getPreparedClassOption, getPurposeString, prepareClassOptions, prepareForUse, prepareForUse
copy, measureByteSize, measureByteSize, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getTaskResultType
copy, measureByteSize
public String getTaskName()
public Object doTask()
Task
public Object doTask(TaskMonitor monitor, ObjectRepository repository)
Task
AbstractTask
implements this method so all
its extensions only need to implement doTaskImpl
protected abstract Object doTaskImpl(TaskMonitor monitor, ObjectRepository repository)
AbstractTask
implements doTask
so all
its extensions only need to implement doTaskImpl
.monitor
- the TaskMonitor to userepository
- the ObjectRepository to useprotected void prepareForUseImpl(TaskMonitor monitor, ObjectRepository repository)
AbstractOptionHandler
prepareForUseImpl
and not prepareForUse
since
prepareForUse
calls prepareForUseImpl
.prepareForUseImpl
in class AbstractOptionHandler
monitor
- the TaskMonitor to userepository
- the ObjectRepository to usepublic void getDescription(StringBuilder sb, int indent)
MOAObject
AbstractMOAObject.toString
to give a string representation of the object.getDescription
in interface MOAObject
sb
- the stringbuilder to add the descriptionindent
- the number of characters to indentCopyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.