public abstract class Javadoc extends Object implements OptionHandler, RevisionHandler
Constructor and Description |
---|
Javadoc() |
Modifier and Type | Method and Description |
---|---|
String |
generate()
generates either the plain Javadoc (if no filename specified) or the
updated file (if a filename is specified).
|
String |
generateHelp()
generates a string to print as help on the console
|
String |
getClassname()
returns the current classname
|
String |
getDir()
returns the current dir containing the class to update.
|
String[] |
getOptions()
Gets the current settings of this object.
|
boolean |
getSilent()
whether output in the console is suppressed
|
boolean |
getUseStars()
whether the Javadoc is prefixed with "*"
|
Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
void |
setClassname(String value)
sets the classname of the class to generate the Javadoc for
|
void |
setDir(String value)
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 console
|
void |
setUseStars(boolean value)
sets whether to prefix the Javadoc with "*"
|
String |
updateJavadoc()
generates the Javadoc and returns it applied to the source file if one
was provided, otherwise an empty string.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRevision
public Enumeration listOptions()
listOptions
in interface OptionHandler
public void setOptions(String[] options) throws Exception
setOptions
in interface OptionHandler
options
- the list of options as an array of stringsException
- if an option is not supportedpublic String[] getOptions()
getOptions
in interface OptionHandler
public void setClassname(String value)
value
- the new classnamepublic String getClassname()
public void setUseStars(boolean value)
value
- true if stars are usedpublic boolean getUseStars()
public void setDir(String value)
value
- the directory containing the classespublic String getDir()
public void setSilent(boolean value)
value
- true if output is to be suppressedpublic boolean getSilent()
public String updateJavadoc() throws Exception
Exception
- in case the generation failspublic String generate() throws Exception
Exception
- in case the generation failspublic String generateHelp()
Copyright © 2019 University of Waikato, Hamilton, NZ. All rights reserved.