Package adams.core.option
Class AbstractRecursiveOptionProducer<O,I>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.option.AbstractOptionProducer<O,I>
-
- adams.core.option.AbstractRecursiveOptionProducer<O,I>
-
- Type Parameters:
O
- the type of output data that gets generatedI
- the internal type used while nesting
- All Implemented Interfaces:
CleanUpHandler
,LoggingSupporter
,OptionProducer<O,I>
,RecursiveOptionProducer
,SizeOfHandler
,Serializable
- Direct Known Subclasses:
AbstractRecursiveOptionProducerWithOptionHandling
,ArrayProducer
,CompactFlowProducer
,JsonProducer
,NestedProducer
public abstract class AbstractRecursiveOptionProducer<O,I> extends AbstractOptionProducer<O,I> implements RecursiveOptionProducer
Generates output from visiting the options recursively.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Stack<I>
m_Nesting
keeping track of nesting.-
Fields inherited from class adams.core.option.AbstractOptionProducer
m_Input, m_LastGenerated, m_Output, m_OutputVariableValues, m_SkippedProperties, m_UsePropertyNames
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractRecursiveOptionProducer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanUp()
Cleans up data structures, frees up memory.protected String
generateLoggingString(String s)
Generates a debug string, e.g., based on the method name.protected String
getDebugIndentation()
Returns the indentation string based on the current nesting level.protected String
getDebugIndentation(int level)
Returns the indentation string based on the nesting level.int
getRecursionLevel()
Returns the current nesting level.protected void
reset()
Used for initializing members.-
Methods inherited from class adams.core.option.AbstractOptionProducer
checkInput, doProduce, doProduce, getCurrentValue, getInput, getOptionIdentifier, getOutput, getOutputVariableValues, getSkippedProperties, getUsePropertyNames, globalInfo, initialize, initOutput, isDefaultValue, loggingLevelTipText, main, outputVariableValuesTipText, postProduce, postProduce, preProduce, preProduce, processOption, processOption, processOption, produce, produce, runProducer, setLoggingLevel, setOutputVariableValues, setSkippedProperties, toString, toString, write
-
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, wait, wait, wait
-
Methods inherited from interface adams.core.option.OptionProducer
getLoggingLevel
-
-
-
-
Method Detail
-
reset
protected void reset()
Used for initializing members.- Overrides:
reset
in classAbstractOptionProducer<O,I>
-
generateLoggingString
protected String generateLoggingString(String s)
Generates a debug string, e.g., based on the method name.
Default implementation merely returns the string.- Overrides:
generateLoggingString
in classAbstractOptionProducer<O,I>
- Parameters:
s
- the string to process- Returns:
- the processed string
-
getRecursionLevel
public int getRecursionLevel()
Returns the current nesting level.- Specified by:
getRecursionLevel
in interfaceRecursiveOptionProducer
- Returns:
- the current level
-
getDebugIndentation
protected String getDebugIndentation()
Returns the indentation string based on the current nesting level.- Returns:
- the indentation
- See Also:
getRecursionLevel()
-
getDebugIndentation
protected String getDebugIndentation(int level)
Returns the indentation string based on the nesting level.- Parameters:
level
- the nesting level- Returns:
- the indentation
-
cleanUp
public void cleanUp()
Cleans up data structures, frees up memory.- Specified by:
cleanUp
in interfaceCleanUpHandler
- Specified by:
cleanUp
in interfaceOptionProducer<O,I>
- Overrides:
cleanUp
in classAbstractOptionProducer<O,I>
-
-