Package adams.core.option
Interface OptionProducer<O,I>
-
- Type Parameters:
O
- the type of output data that gets generatedI
- the internal type used while nesting
- All Superinterfaces:
CleanUpHandler
- All Known Subinterfaces:
DebugOptionProducer<O,I>
,OptionProducerWithOptionHandling<O,I>
- All Known Implementing Classes:
AbstractActorJavaCodeProducer
,AbstractDocumentationProducer
,AbstractFlowJavaCodeProducer
,AbstractJavaCodeProducer
,AbstractOptionProducer
,AbstractRecursiveOptionProducer
,AbstractRecursiveOptionProducerWithOptionHandling
,ActorExecutionClassProducer
,ApplyActorProducer
,ArrayProducer
,CommandlineHelpProducer
,CompactFlowProducer
,DatabaseActorExecutionClassProducer
,DebugNestedProducer
,FlowJUnitTestProducer
,FlowStructureDotProducer
,FlowStructureGraphMLProducer
,HtmlHelpProducer
,HtmlParametersProducer
,JavaInstantiationProducer
,JsonClassDescriptionProducer
,JsonProducer
,MaterializedArrayProducer
,NestedProducer
,XhtmlProducer
public interface OptionProducer<O,I> extends CleanUpHandler
Interface for classes that generate output from visiting the options.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cleanUp()
Cleans up data structures, frees up memory.I
doProduce(AbstractOption option)
Visits the option and obtains information from it.OptionHandler
getInput()
Returns the visited top-level object.LoggingLevel
getLoggingLevel()
Returns the logging level.O
getOutput()
Returns the output generated from the visit.boolean
getOutputVariableValues()
Returns whether the values of options are output instead of variable placeholders.HashSet<String>
getSkippedProperties()
Returns the skipped top-level properties.boolean
getUsePropertyNames()
Returns whether property names are used or just the command-line flags.String
globalInfo()
Returns a string describing the object.String
loggingLevelTipText()
Returns the tip text for this property.String
outputVariableValuesTipText()
Returns the tip text for this property.I
processOption(AbstractArgumentOption option)
Visits an argument option.I
processOption(BooleanOption option)
Visits a boolean option.I
processOption(ClassOption option)
Visits a class option.O
produce(OptionHandler visitedObject)
Visits the option and obtains information from it.void
setLoggingLevel(LoggingLevel value)
Sets the logging level.void
setOutputVariableValues(boolean value)
Sets whether to output the values of options instead of variable placeholders.void
setSkippedProperties(HashSet<String> value)
Sets the top-level properties to skip.String
toString()
Returns the output generated from the visit.boolean
write(String filename)
Writes the generated content to the specified file.
-
-
-
Method Detail
-
globalInfo
String globalInfo()
Returns a string describing the object.- Returns:
- a description suitable for displaying in the gui
-
setLoggingLevel
void setLoggingLevel(LoggingLevel value)
Sets the logging level.- Parameters:
value
- the level
-
getLoggingLevel
LoggingLevel getLoggingLevel()
Returns the logging level.- Returns:
- true if logging output is on
-
loggingLevelTipText
String loggingLevelTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOutputVariableValues
void setOutputVariableValues(boolean value)
Sets whether to output the values of options instead of variable placeholders.- Parameters:
value
- if true then the values are output instead of variable placeholders
-
getOutputVariableValues
boolean getOutputVariableValues()
Returns whether the values of options are output instead of variable placeholders.- Returns:
- true if values are output instead of variable placeholders
-
outputVariableValuesTipText
String outputVariableValuesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setSkippedProperties
void setSkippedProperties(HashSet<String> value)
Sets the top-level properties to skip.- Parameters:
value
- the properties
-
getSkippedProperties
HashSet<String> getSkippedProperties()
Returns the skipped top-level properties.- Returns:
- the properties
-
getUsePropertyNames
boolean getUsePropertyNames()
Returns whether property names are used or just the command-line flags.- Returns:
- true if property names are used
-
getInput
OptionHandler getInput()
Returns the visited top-level object.- Returns:
- the visited object
-
getOutput
O getOutput()
Returns the output generated from the visit.- Returns:
- the output
-
processOption
I processOption(BooleanOption option)
Visits a boolean option.- Parameters:
option
- the boolean option- Returns:
- the last internal data structure that was generated
-
processOption
I processOption(ClassOption option)
Visits a class option.- Parameters:
option
- the class option- Returns:
- the last internal data structure that was generated
-
processOption
I processOption(AbstractArgumentOption option)
Visits an argument option.- Parameters:
option
- the argument option- Returns:
- the last internal data structure that was generated
-
doProduce
I doProduce(AbstractOption option)
Visits the option and obtains information from it.- Parameters:
option
- the current option- Returns:
- the last internal data structure that was generated
-
produce
O produce(OptionHandler visitedObject)
Visits the option and obtains information from it.- Parameters:
visitedObject
- the option handler to visit- Returns:
- the generated output
-
toString
String toString()
Returns the output generated from the visit.
-
write
boolean write(String filename)
Writes the generated content to the specified file.- Parameters:
filename
- the file to write to- Returns:
- true if successfully written
-
cleanUp
void cleanUp()
Cleans up data structures, frees up memory.- Specified by:
cleanUp
in interfaceCleanUpHandler
-
-