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 ArrayConsumer
m_Consumer
the internal consumer in use for parsing commandlines.protected BaseCharset
m_Encoding
the 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 List
convertToInput(String s)
Converts the input string into the internal format.protected void
doConsume(OptionManager manager, List input)
Visits the options.String
encodingTipText()
Returns the tip text for this property.BaseCharset
getEncoding()
Returns the encoding to use.String
globalInfo()
Returns a string describing the object.protected void
initialize()
Initializes the members.protected OptionHandler
initOutput()
Creates the empty option handler from the internal data structure and returns it.protected void
processOption(AbstractArgumentOption option, List values)
Unused.protected void
processOption(BooleanOption option, List values)
Unused.protected void
processOption(ClassOption option, List values)
Unused.void
setEncoding(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:
globalInfo
in interfaceOptionConsumer<List,List>
- Specified by:
globalInfo
in classAbstractOptionConsumer<List,List>
- Returns:
- a description suitable for displaying in the gui
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classAbstractOptionConsumer<List,List>
-
setEncoding
public void setEncoding(BaseCharset value)
Sets the encoding to use.- Specified by:
setEncoding
in 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:
getEncoding
in 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:
encodingTipText
in 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:
convertToInput
in 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:
initOutput
in 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:
processOption
in 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:
processOption
in 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:
processOption
in 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:
doConsume
in classAbstractOptionConsumer<List,List>
- Parameters:
manager
- the manager to visitinput
- the input data to use
-
-