Package adams.core.option
Class AbstractRecursiveOptionConsumer<C,V>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.option.AbstractOptionConsumer<C,V>
-
- adams.core.option.AbstractRecursiveOptionConsumer<C,V>
-
- Type Parameters:
C- the type of data to consumeV- the type of data used for values
- All Implemented Interfaces:
CleanUpHandler,LoggingSupporter,OptionConsumer<C,V>,RecursiveOptionConsumer,SizeOfHandler,Serializable
- Direct Known Subclasses:
ArrayConsumer,CompactFlowConsumer,JsonConsumer,NestedConsumer
public abstract class AbstractRecursiveOptionConsumer<C,V> extends AbstractOptionConsumer<C,V> implements RecursiveOptionConsumer
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 Stackm_Nestingkeeping track of 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 AbstractRecursiveOptionConsumer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanUp()Cleans up data structures, frees up memory.protected StringgenerateLoggingString(String s)Generates a debug string, e.g., based on the method name.protected StringgetDebugIndentation()Returns the indentation string based on the current nesting level.protected StringgetDebugIndentation(int level)Returns the indentation string based on the nesting level.intgetRecursionLevel()Returns the current nesting level.protected voidreset()Used for initializing members.-
Methods inherited from class adams.core.option.AbstractOptionConsumer
checkDeprecation, checkDeprecation, consume, consume, consume, convertToInput, determineCharset, doConsume, forName, fromFile, fromFile, fromString, fromString, fromString, getErrors, getInput, getOptionIdentifier, getOutput, getSkippedProperties, getUsePropertyNames, getWarnings, getWriteMethod, globalInfo, hasErrors, hasWarnings, initialize, initOutput, isQuiet, logError, logWarning, processOption, processOption, processOption, 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_Nesting
protected Stack m_Nesting
keeping track of nesting.
-
-
Method Detail
-
reset
protected void reset()
Used for initializing members.- Overrides:
resetin classAbstractOptionConsumer<C,V>
-
generateLoggingString
protected String generateLoggingString(String s)
Generates a debug string, e.g., based on the method name.- Overrides:
generateLoggingStringin classAbstractOptionConsumer<C,V>- Parameters:
s- the string to process- Returns:
- the processed string
-
getRecursionLevel
public int getRecursionLevel()
Returns the current nesting level.- Specified by:
getRecursionLevelin interfaceRecursiveOptionConsumer- 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:
cleanUpin interfaceCleanUpHandler- Specified by:
cleanUpin interfaceOptionConsumer<C,V>- Overrides:
cleanUpin classAbstractOptionConsumer<C,V>
-
-