Package adams.doc.listing
Class OptionOutput
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,EncodingSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,UserModeSupporter
,QuickInfoSupporter
,SizeOfHandler
,Serializable
public class OptionOutput extends AbstractListingOutput implements EncodingSupporter, UserModeSupporter
Creates a sub-directory for each module and stores the generated output in there, one file per class.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected BaseCharset
m_Encoding
the encoding to use.protected String
m_Extension
the extension to use for the files.protected PlaceholderDirectory
m_OutputDir
the output directory.protected OptionProducer
m_Producer
the option producer to use.protected UserMode
m_UserMode
the user mode to generate the help for.-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description OptionOutput()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected String
doGenerate(Class superclass, Map<String,List<String>> listing)
Outputs the supplied listing.String
encodingTipText()
Returns the tip text for this property.String
extensionTipText()
Returns the tip text for this property.BaseCharset
getEncoding()
Returns the encoding to use.String
getExtension()
Returns the extension to use.PlaceholderDirectory
getOutputDir()
Returns the output directory.OptionProducer
getProducer()
Returns the producer.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.UserMode
getUserMode()
Returns the user mode to pass on to the producer if that supports it.String
globalInfo()
Returns a string describing the object.String
outputDirTipText()
Returns the tip text for this property.String
producerTipText()
Returns the tip text for this property.void
setEncoding(BaseCharset value)
Sets the encoding to use.void
setExtension(String value)
Sets the extension to use.void
setOutputDir(PlaceholderDirectory value)
Sets the output directory.void
setProducer(OptionProducer value)
Sets the producer.void
setUserMode(UserMode value)
Sets the user mode to pass on to the producer if that supports it.String
userModeTipText()
Returns the tip text for this property.-
Methods inherited from class adams.doc.listing.AbstractListingOutput
check, generate, getModules
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
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.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Producer
protected OptionProducer m_Producer
the option producer to use.
-
m_OutputDir
protected PlaceholderDirectory m_OutputDir
the output directory.
-
m_Extension
protected String m_Extension
the extension to use for the files.
-
m_Encoding
protected BaseCharset m_Encoding
the encoding to use.
-
m_UserMode
protected UserMode m_UserMode
the user mode to generate the help for.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setOutputDir
public void setOutputDir(PlaceholderDirectory value)
Sets the output directory.- Parameters:
value
- the directory
-
getOutputDir
public PlaceholderDirectory getOutputDir()
Returns the output directory.- Returns:
- the directory
-
outputDirTipText
public String outputDirTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setProducer
public void setProducer(OptionProducer value)
Sets the producer.- Parameters:
value
- the producer
-
getProducer
public OptionProducer getProducer()
Returns the producer.- Returns:
- the producer
-
producerTipText
public String producerTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setUserMode
public void setUserMode(UserMode value)
Sets the user mode to pass on to the producer if that supports it.- Specified by:
setUserMode
in interfaceUserModeSupporter
- Parameters:
value
- the user mode
-
getUserMode
public UserMode getUserMode()
Returns the user mode to pass on to the producer if that supports it.- Specified by:
getUserMode
in interfaceUserModeSupporter
- Returns:
- the user mode
-
userModeTipText
public String userModeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setExtension
public void setExtension(String value)
Sets the extension to use.- Parameters:
value
- the extension (incl dot)
-
getExtension
public String getExtension()
Returns the extension to use.- Returns:
- the extension (incl dot)
-
extensionTipText
public String extensionTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
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.
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractListingOutput
- Returns:
- null if no info available, otherwise short string
-
doGenerate
protected String doGenerate(Class superclass, Map<String,List<String>> listing)
Outputs the supplied listing.- Specified by:
doGenerate
in classAbstractListingOutput
- Parameters:
superclass
- the superclass this listing is forlisting
- the listing to output (module -> classnames)- Returns:
- null if successful, otherwise error message
-
-