org.incava.doctorj

Class TypeDocAnalyzer

Known Direct Subclasses:
ClassDocAnalyzer, InterfaceDocAnalyzer

public abstract class TypeDocAnalyzer
extends ItemDocAnalyzer

Analyzes Javadoc and code for a type, which is a class (concrete or abstract) or an interface.

Field Summary

static String
MSG_AUTHOR_WITHOUT_NAME
The message for an author without a name.
static String
MSG_SERIAL_WITHOUT_TEXT
The message for a serial field without a description.
static String
MSG_VERSION_WITHOUT_TEXT
The message for a version without associated text.

Fields inherited from class org.incava.doctorj.ItemDocAnalyzer

CHKLVL_MISORDERED_TAGS, CHKLVL_SUMMARY_SENTENCE, CHKLVL_VALID_TAGS, MSG_DEPRECATED_WITHOUT_TEXT, MSG_NO_SUMMARY_SENTENCE, MSG_SEE_WITHOUT_REFERENCE, MSG_SINCE_WITHOUT_TEXT, MSG_SUMMARY_SENTENCE_DOES_NOT_END_WITH_PERIOD, MSG_SUMMARY_SENTENCE_TOO_SHORT, MSG_TAG_IMPROPER_ORDER, spellChecker

Fields inherited from class org.incava.doctorj.DocAnalyzer

CHKLVL_DOC_EXISTS, CHKLVL_TAG_CONTENT

Constructor Summary

TypeDocAnalyzer(Report r, net.sourceforge.pmd.ast.ASTClassOrInterfaceDeclaration decl)
Creates an analyzer, but does not yet run.

Method Summary

protected void
addUndocumentedViolation(String desc)
Adds a violation, for something that is not documented.
protected void
checkJavadoc(JavadocNode javadoc)
Checks the Javadoc against that expected by a type.
protected net.sourceforge.pmd.ast.SimpleNode
getEnclosingNode()
Returns the node that contains the access and modifier tokens.

Methods inherited from class org.incava.doctorj.ItemDocAnalyzer

addDictionary, addUndocumentedViolation, checkForTagDescription, checkJavadoc, getEnclosingNode, getItemType, getJavadoc, getNode, getValidTags, run

Methods inherited from class org.incava.doctorj.DocAnalyzer

isCheckable

Methods inherited from class org.incava.analysis.Analyzer

addViolation, addViolation, addViolation, addViolation, getReport

Field Details

MSG_AUTHOR_WITHOUT_NAME

public static final String MSG_AUTHOR_WITHOUT_NAME
The message for an author without a name.

MSG_SERIAL_WITHOUT_TEXT

public static final String MSG_SERIAL_WITHOUT_TEXT
The message for a serial field without a description.

MSG_VERSION_WITHOUT_TEXT

public static final String MSG_VERSION_WITHOUT_TEXT
The message for a version without associated text.

Constructor Details

TypeDocAnalyzer

public TypeDocAnalyzer(Report r,
                       net.sourceforge.pmd.ast.ASTClassOrInterfaceDeclaration decl)
Creates an analyzer, but does not yet run.

Method Details

addUndocumentedViolation

protected void addUndocumentedViolation(String desc)
Adds a violation, for something that is not documented.
Overrides:
addUndocumentedViolation in interface ItemDocAnalyzer

checkJavadoc

protected void checkJavadoc(JavadocNode javadoc)
Checks the Javadoc against that expected by a type.
Overrides:
checkJavadoc in interface ItemDocAnalyzer

getEnclosingNode

protected net.sourceforge.pmd.ast.SimpleNode getEnclosingNode()
Returns the node that contains the access and modifier tokens.
Overrides:
getEnclosingNode in interface ItemDocAnalyzer