Package daikon.config
Class ParameterDoclet
- Object
-
- ParameterDoclet
-
- All Implemented Interfaces:
Doclet
public class ParameterDoclet extends Object implements Doclet
ParameterDoclet is a JavaDoc doclet that collects information about the run-time configuration options for the Daikon tools. Refer to the--config
command-line option in the Daikon manual for an introduction to the configuration system.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface Doclet
Doclet.Option
-
-
Field Summary
Fields Modifier and Type Field Description protected ParameterDoclet.DocCategory[]
categories
A data structure for the document categories.static Pattern
endOfSentence
A Pattern used to check for the end of a sentence.static String
NO_DESCRIPTION
A value that indicates no description was found.static String
UNKNOWN_DEFAULT
A value that indicates no default value was found.
-
Constructor Summary
Constructors Constructor Description ParameterDoclet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDocComment(DocCommentTree node)
Fetch the comment string from a DocCommentTree node.String
getName()
Set<? extends Doclet.Option>
getSupportedOptions()
SourceVersion
getSupportedSourceVersion()
void
init(Locale locale, Reporter reporter)
void
initDocCategories()
Initialize the categories data structure.static boolean
isTypeElement(Element element)
Returns true if the given element kind is a type, i.e., a class, enum, interface, or annotation type.void
process(String fullname, String name, String desc)
Add (name, desc) pair to the map field 'fields' for the appropriate category.void
processField(Element field)
Call Process(String, String, String) for each configuration field found.boolean
run(DocletEnvironment denv)
Entry point for this doclet (invoked by javadoc).void
writeTexInfo(PrintWriter out)
Output the parameter info in textinfo format.void
writeText(PrintWriter out)
Output the parameter info in text format.
-
-
-
Field Detail
-
categories
protected ParameterDoclet.DocCategory[] categories
A data structure for the document categories.
-
NO_DESCRIPTION
public static String NO_DESCRIPTION
A value that indicates no description was found.
-
UNKNOWN_DEFAULT
public static String UNKNOWN_DEFAULT
A value that indicates no default value was found.
-
endOfSentence
public static Pattern endOfSentence
A Pattern used to check for the end of a sentence.
-
-
Constructor Detail
-
ParameterDoclet
public ParameterDoclet()
-
-
Method Detail
-
getSupportedOptions
public Set<? extends Doclet.Option> getSupportedOptions()
- Specified by:
getSupportedOptions
in interfaceDoclet
-
getSupportedSourceVersion
public SourceVersion getSupportedSourceVersion()
- Specified by:
getSupportedSourceVersion
in interfaceDoclet
-
run
public boolean run(DocletEnvironment denv)
Entry point for this doclet (invoked by javadoc).
-
initDocCategories
public void initDocCategories()
Initialize the categories data structure.
-
processField
public void processField(Element field)
Call Process(String, String, String) for each configuration field found. Intended to be overridden.- Parameters:
field
- the javadoc element for a member field.
-
process
public void process(String fullname, String name, String desc)
Add (name, desc) pair to the map field 'fields' for the appropriate category.- Parameters:
fullname
- the fully-qualified name of a Daikon configuration variable (no "dkconfig_")name
- the simple name of the variable (starts with "dkconfig_")desc
- the javadoc comment for this variable
-
writeTexInfo
public void writeTexInfo(PrintWriter out)
Output the parameter info in textinfo format.- Parameters:
out
- where to write the data
-
writeText
public void writeText(PrintWriter out)
Output the parameter info in text format.- Parameters:
out
- where to write the data
-
getDocComment
public String getDocComment(DocCommentTree node)
Fetch the comment string from a DocCommentTree node.- Parameters:
node
- the DocCommentTree to process- Returns:
- the entire body of the documentation comment as a string. If no comments are found, an empty string is returned (not null).
-
isTypeElement
public static boolean isTypeElement(Element element)
Returns true if the given element kind is a type, i.e., a class, enum, interface, or annotation type.- Parameters:
element
- the element to test- Returns:
- true, iff the given kind is a type kind
-
-