Package adams.core.option
Class CompactFlowConsumer
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.option.AbstractOptionConsumer<C,V>
-
- adams.core.option.AbstractRecursiveOptionConsumer<List,List>
-
- adams.core.option.CompactFlowConsumer
-
- All Implemented Interfaces:
CleanUpHandler,EncodingSupporter,LoggingSupporter,OptionConsumer<List,List>,RecursiveOptionConsumer,SizeOfHandler,Serializable
public class CompactFlowConsumer extends AbstractRecursiveOptionConsumer<List,List> implements EncodingSupporter
Reads nested, compact actor flow format.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ArrayConsumerm_Consumerthe internal consumer in use for parsing commandlines.protected BaseCharsetm_Encodingthe encoding to use.-
Fields inherited from class adams.core.option.AbstractRecursiveOptionConsumer
m_Nesting
-
Fields inherited from class adams.core.option.AbstractOptionConsumer
m_ClassnameCache, m_Errors, m_Input, m_Output, m_SkippedProperties, m_UsePropertyNames, m_Warnings
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description CompactFlowConsumer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ListconvertToInput(String s)Converts the input string into the internal format.protected voiddoConsume(OptionManager manager, List input)Visits the options.StringencodingTipText()Returns the tip text for this property.BaseCharsetgetEncoding()Returns the encoding to use.StringglobalInfo()Returns a string describing the object.protected voidinitialize()Initializes the members.protected OptionHandlerinitOutput()Creates the empty option handler from the internal data structure and returns it.protected voidprocessOption(AbstractArgumentOption option, List values)Unused.protected voidprocessOption(BooleanOption option, List values)Unused.protected voidprocessOption(ClassOption option, List values)Unused.voidsetEncoding(BaseCharset value)Sets the encoding to use.-
Methods inherited from class adams.core.option.AbstractRecursiveOptionConsumer
cleanUp, generateLoggingString, getDebugIndentation, getDebugIndentation, getRecursionLevel, reset
-
Methods inherited from class adams.core.option.AbstractOptionConsumer
checkDeprecation, checkDeprecation, consume, consume, consume, determineCharset, forName, fromFile, fromFile, fromString, fromString, fromString, getErrors, getInput, getOptionIdentifier, getOutput, getSkippedProperties, getUsePropertyNames, getWarnings, getWriteMethod, hasErrors, hasWarnings, isQuiet, logError, logWarning, processOption, read, setInput, setLoggingLevel, setQuiet, setSkippedProperties
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface adams.core.option.OptionConsumer
getLoggingLevel
-
-
-
-
Field Detail
-
m_Encoding
protected BaseCharset m_Encoding
the encoding to use.
-
m_Consumer
protected ArrayConsumer m_Consumer
the internal consumer in use for parsing commandlines.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceOptionConsumer<List,List>- Specified by:
globalInfoin classAbstractOptionConsumer<List,List>- Returns:
- a description suitable for displaying in the gui
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein classAbstractOptionConsumer<List,List>
-
setEncoding
public void setEncoding(BaseCharset value)
Sets the encoding to use.- Specified by:
setEncodingin interfaceEncodingSupporter- Parameters:
value- the encoding, e.g. "UTF-8" or "UTF-16", empty string for default
-
getEncoding
public BaseCharset getEncoding()
Returns the encoding to use.- Specified by:
getEncodingin interfaceEncodingSupporter- Returns:
- the encoding, e.g. "UTF-8" or "UTF-16", empty string for default
-
encodingTipText
public String encodingTipText()
Returns the tip text for this property.- Specified by:
encodingTipTextin interfaceEncodingSupporter- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
convertToInput
protected List convertToInput(String s)
Converts the input string into the internal format.- Specified by:
convertToInputin classAbstractOptionConsumer<List,List>- Parameters:
s- the string to process- Returns:
- the internal format, null in case of an error
-
initOutput
protected OptionHandler initOutput()
Creates the empty option handler from the internal data structure and returns it. This option handler will then be "visited".- Specified by:
initOutputin classAbstractOptionConsumer<List,List>- Returns:
- the generated option handler, null in case of an error
-
processOption
protected void processOption(BooleanOption option, List values) throws Exception
Unused.- Specified by:
processOptionin classAbstractOptionConsumer<List,List>- Parameters:
option- the boolean option to processvalues- the value for the boolean option- Throws:
Exception- if something goes wrong
-
processOption
protected void processOption(ClassOption option, List values) throws Exception
Unused.- Specified by:
processOptionin classAbstractOptionConsumer<List,List>- Parameters:
option- the boolean option to processvalues- the value for the boolean option- Throws:
Exception- if something goes wrong
-
processOption
protected void processOption(AbstractArgumentOption option, List values) throws Exception
Unused.- Specified by:
processOptionin classAbstractOptionConsumer<List,List>- Parameters:
option- the boolean option to processvalues- the value for the boolean option- Throws:
Exception- if something goes wrong
-
doConsume
protected void doConsume(OptionManager manager, List input)
Visits the options.- Specified by:
doConsumein classAbstractOptionConsumer<List,List>- Parameters:
manager- the manager to visitinput- the input data to use
-
-