Package weka.core
Class Javadoc
java.lang.Object
weka.core.Javadoc
- All Implemented Interfaces:
OptionHandler
,RevisionHandler
- Direct Known Subclasses:
AllJavadoc
,GlobalInfoJavadoc
,OptionHandlerJavadoc
,TechnicalInformationHandlerJavadoc
Abstract superclass for classes that generate Javadoc comments and replace
the content between certain comment tags.
- Version:
- $Revision: 11734 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongenerate()
generates either the plain Javadoc (if no filename specified) or the updated file (if a filename is specified).generates a string to print as help on the consolereturns the current classnamegetDir()
returns the current dir containing the class to update.String[]
Gets the current settings of this object.boolean
whether output in the console is suppressedboolean
whether the Javadoc is prefixed with "*"Returns an enumeration describing the available options.void
setClassname
(String value) sets the classname of the class to generate the Javadoc forvoid
sets the dir containing the file that is to be updated.void
setOptions
(String[] options) Parses a given list of options.void
setSilent
(boolean value) sets whether to suppress output in the consolevoid
setUseStars
(boolean value) sets whether to prefix the Javadoc with "*"generates the Javadoc and returns it applied to the source file if one was provided, otherwise an empty string.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface weka.core.RevisionHandler
getRevision
-
Constructor Details
-
Javadoc
public Javadoc()
-
-
Method Details
-
listOptions
Returns an enumeration describing the available options.- Specified by:
listOptions
in interfaceOptionHandler
- Returns:
- an enumeration of all the available options.
-
setOptions
Parses a given list of options.- Specified by:
setOptions
in interfaceOptionHandler
- Parameters:
options
- the list of options as an array of strings- Throws:
Exception
- if an option is not supported
-
getOptions
Gets the current settings of this object.- Specified by:
getOptions
in interfaceOptionHandler
- Returns:
- an array of strings suitable for passing to setOptions
-
setClassname
sets the classname of the class to generate the Javadoc for- Parameters:
value
- the new classname
-
getClassname
returns the current classname- Returns:
- the current classname
-
setUseStars
public void setUseStars(boolean value) sets whether to prefix the Javadoc with "*"- Parameters:
value
- true if stars are used
-
getUseStars
public boolean getUseStars()whether the Javadoc is prefixed with "*"- Returns:
- whether stars are used
-
setDir
sets the dir containing the file that is to be updated. It is the dir above the package hierarchy of the class.- Parameters:
value
- the directory containing the classes
-
getDir
returns the current dir containing the class to update. It is the dir above the package name of the class.- Returns:
- the current directory
-
setSilent
public void setSilent(boolean value) sets whether to suppress output in the console- Parameters:
value
- true if output is to be suppressed
-
getSilent
public boolean getSilent()whether output in the console is suppressed- Returns:
- true if output is suppressed
-
updateJavadoc
generates the Javadoc and returns it applied to the source file if one was provided, otherwise an empty string.- Returns:
- the generated Javadoc
- Throws:
Exception
- in case the generation fails
-
generate
generates either the plain Javadoc (if no filename specified) or the updated file (if a filename is specified). The start and end tag for the global info have to be specified in the file in the latter case.- Returns:
- either the plain Javadoc or the modified file
- Throws:
Exception
- in case the generation fails
-
generateHelp
generates a string to print as help on the console- Returns:
- the generated help
-