Package adams.doc.javadoc
Class OptionHandlerJavadoc
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.doc.javadoc.Javadoc
-
- adams.doc.javadoc.OptionHandlerJavadoc
-
- All Implemented Interfaces:
Destroyable,LoggingSupporter,OptionHandler,UserModeSupporter,SizeOfHandler,Serializable
public class OptionHandlerJavadoc extends Javadoc
Generates Javadoc comments from the OptionHandler's options. Can automatically update the option comments if they're surrounded by the OPTIONS_STARTTAG and OPTIONS_ENDTAG (the indention is determined via the OPTIONS_STARTTAG).
Valid options are:
-env <java.lang.String> (property: environment) The class to use for determining the environment. default: adams.core.Environment-W <java.lang.String> (property: classname) The class to load. default: adams.doc.AllJavadoc-nostars (property: useStars) Controls the use of '*' in the Javadoc.-dir <java.lang.String> (property: dir) The directory above the package hierarchy of the class. default: .-silent (property: silent) Suppresses printing in the console.-noprolog (property: Prolog) Controls the 'Valid options are...' prolog in the Javadoc.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
OPTIONS_STARTTAG,OPTIONS_ENDTAG,OptionHandlerJavadoc, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanm_Prologwhether to include the "Valid options..." prolog in the Javadoc.static StringOPTIONS_ENDTAGthe end comment tag for inserting the generated Javadoc.static StringOPTIONS_STARTTAGthe start comment tag for inserting the generated Javadoc.-
Fields inherited from class adams.doc.javadoc.Javadoc
m_Classname, m_Dir, m_EndTag, m_Environment, m_IsBlock, m_OptionManager, m_Silent, m_StartTag, m_UserMode, m_UseStars
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description OptionHandlerJavadoc()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.protected StringgenerateJavadoc(int index)generates and returns the Javadoc for the specified start/end tag pair.protected StringgenerateJavadoc(String option)Generates valid HTML Javadoc from the given option.booleangetProlog()whether "Valid options are..." prolog is included in the Javadoc.protected voidinitialize()Initializes the members.static voidmain(String[] args)Parses the given commandline parameters and generates the Javadoc.StringPrologTipText()Returns the tip text for this property.voidsetProlog(boolean value)sets whether to add the "Valid options are..." prolog.-
Methods inherited from class adams.doc.javadoc.Javadoc
canInstantiateClass, classnameTipText, cleanUpOptions, destroy, dirTipText, environmentTipText, forCommandLine, forName, generate, generateJavadoc, getClassname, getDir, getEnvironment, getIndentionLength, getIndentionString, getInstance, getJavadocs, getOptionManager, getSilent, getUserMode, getUseStars, indent, newOptionManager, println, runJavadoc, setClassname, setDir, setEnvironment, setSilent, setUserMode, setUseStars, silentTipText, toCommandLine, toHTML, toString, updateJavadoc, updateJavadoc, updateJavadoc, userModeTipText, useStarsTipText
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
OPTIONS_STARTTAG
public static final String OPTIONS_STARTTAG
the start comment tag for inserting the generated Javadoc.- See Also:
- Constant Field Values
-
OPTIONS_ENDTAG
public static final String OPTIONS_ENDTAG
the end comment tag for inserting the generated Javadoc.- See Also:
- Constant Field Values
-
m_Prolog
protected boolean m_Prolog
whether to include the "Valid options..." prolog in the Javadoc.
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein classJavadoc
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classJavadoc
-
setProlog
public void setProlog(boolean value)
sets whether to add the "Valid options are..." prolog.- Parameters:
value- true if the prolog is to be added
-
getProlog
public boolean getProlog()
whether "Valid options are..." prolog is included in the Javadoc.- Returns:
- true if the prolog is printed
-
PrologTipText
public String PrologTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
generateJavadoc
protected String generateJavadoc(String option)
Generates valid HTML Javadoc from the given option.- Parameters:
option- the option to generate Javadoc for- Returns:
- the generated Javadoc
-
generateJavadoc
protected String generateJavadoc(int index) throws Exception
generates and returns the Javadoc for the specified start/end tag pair.- Specified by:
generateJavadocin classJavadoc- Parameters:
index- the index in the start/end tag array- Returns:
- the generated Javadoc
- Throws:
Exception- in case the generation fails
-
main
public static void main(String[] args)
Parses the given commandline parameters and generates the Javadoc.- Parameters:
args- the commandline parameters for the object
-
-