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 BaseCharsetm_Encodingthe encoding to use.protected Stringm_Extensionthe extension to use for the files.protected PlaceholderDirectorym_OutputDirthe output directory.protected OptionProducerm_Producerthe option producer to use.protected UserModem_UserModethe 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 voiddefineOptions()Adds options to the internal list of options.protected StringdoGenerate(Class superclass, Map<String,List<String>> listing)Outputs the supplied listing.StringencodingTipText()Returns the tip text for this property.StringextensionTipText()Returns the tip text for this property.BaseCharsetgetEncoding()Returns the encoding to use.StringgetExtension()Returns the extension to use.PlaceholderDirectorygetOutputDir()Returns the output directory.OptionProducergetProducer()Returns the producer.StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.UserModegetUserMode()Returns the user mode to pass on to the producer if that supports it.StringglobalInfo()Returns a string describing the object.StringoutputDirTipText()Returns the tip text for this property.StringproducerTipText()Returns the tip text for this property.voidsetEncoding(BaseCharset value)Sets the encoding to use.voidsetExtension(String value)Sets the extension to use.voidsetOutputDir(PlaceholderDirectory value)Sets the output directory.voidsetProducer(OptionProducer value)Sets the producer.voidsetUserMode(UserMode value)Sets the user mode to pass on to the producer if that supports it.StringuserModeTipText()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:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin 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:
setUserModein 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:
getUserModein 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:
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.
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin 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:
doGeneratein classAbstractListingOutput- Parameters:
superclass- the superclass this listing is forlisting- the listing to output (module -> classnames)- Returns:
- null if successful, otherwise error message
-
-