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 voidcleanUp()Cleans up data structures, frees up memory.IdoProduce(AbstractOption option)Visits the option and obtains information from it.OptionHandlergetInput()Returns the visited top-level object.LoggingLevelgetLoggingLevel()Returns the logging level.OgetOutput()Returns the output generated from the visit.booleangetOutputVariableValues()Returns whether the values of options are output instead of variable placeholders.HashSet<String>getSkippedProperties()Returns the skipped top-level properties.booleangetUsePropertyNames()Returns whether property names are used or just the command-line flags.StringglobalInfo()Returns a string describing the object.StringloggingLevelTipText()Returns the tip text for this property.StringoutputVariableValuesTipText()Returns the tip text for this property.IprocessOption(AbstractArgumentOption option)Visits an argument option.IprocessOption(BooleanOption option)Visits a boolean option.IprocessOption(ClassOption option)Visits a class option.Oproduce(OptionHandler visitedObject)Visits the option and obtains information from it.voidsetLoggingLevel(LoggingLevel value)Sets the logging level.voidsetOutputVariableValues(boolean value)Sets whether to output the values of options instead of variable placeholders.voidsetSkippedProperties(HashSet<String> value)Sets the top-level properties to skip.StringtoString()Returns the output generated from the visit.booleanwrite(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:
cleanUpin interfaceCleanUpHandler
-
-