org.incava.doctorj

Class ItemDocAnalyzer

Known Direct Subclasses:
FieldDocAnalyzer, FunctionDocAnalyzer, TypeDocAnalyzer

public abstract class ItemDocAnalyzer
extends DocAnalyzer

Analyzes Javadoc and code.

Field Summary

protected static int
CHKLVL_MISORDERED_TAGS
protected static int
CHKLVL_SUMMARY_SENTENCE
protected static int
CHKLVL_VALID_TAGS
static String
MSG_DEPRECATED_WITHOUT_TEXT
static String
MSG_NO_SUMMARY_SENTENCE
static String
MSG_SEE_WITHOUT_REFERENCE
static String
MSG_SINCE_WITHOUT_TEXT
static String
MSG_SUMMARY_SENTENCE_DOES_NOT_END_WITH_PERIOD
static String
MSG_SUMMARY_SENTENCE_TOO_SHORT
static String
MSG_TAG_IMPROPER_ORDER
static ItemCommentSpellCheck
spellChecker

Fields inherited from class org.incava.doctorj.DocAnalyzer

CHKLVL_DOC_EXISTS, CHKLVL_TAG_CONTENT

Constructor Summary

ItemDocAnalyzer(Report r, net.sourceforge.pmd.ast.SimpleNode node)

Method Summary

static void
addDictionary(String dictName)
protected abstract void
addUndocumentedViolation(String desc)
Adds a violation for this type of item, with the violation pointing to the name for this item.
protected void
checkForTagDescription(JavadocTaggedNode taggedNode, String msg)
protected void
checkJavadoc(JavadocNode javadoc)
protected abstract net.sourceforge.pmd.ast.SimpleNode
getEnclosingNode()
Returns the node that contains the access and modifier tokens.
protected abstract String
getItemType()
Returns the type of item this analyzer is operating on.
protected JavadocNode
getJavadoc()
Returns the Javadoc for the given node.
protected net.sourceforge.pmd.ast.SimpleNode
getNode()
protected abstract List
getValidTags()
Returns the valid tags, as strings, for this type of item.
void
run()
Runs the analysis.

Methods inherited from class org.incava.doctorj.DocAnalyzer

isCheckable

Methods inherited from class org.incava.analysis.Analyzer

addViolation, addViolation, addViolation, addViolation, getReport

Field Details

CHKLVL_MISORDERED_TAGS

protected static final int CHKLVL_MISORDERED_TAGS
Field Value:
0

CHKLVL_SUMMARY_SENTENCE

protected static final int CHKLVL_SUMMARY_SENTENCE
Field Value:
1

CHKLVL_VALID_TAGS

protected static final int CHKLVL_VALID_TAGS
Field Value:
0

MSG_DEPRECATED_WITHOUT_TEXT

public static final String MSG_DEPRECATED_WITHOUT_TEXT

MSG_NO_SUMMARY_SENTENCE

public static final String MSG_NO_SUMMARY_SENTENCE

MSG_SEE_WITHOUT_REFERENCE

public static final String MSG_SEE_WITHOUT_REFERENCE

MSG_SINCE_WITHOUT_TEXT

public static final String MSG_SINCE_WITHOUT_TEXT

MSG_SUMMARY_SENTENCE_DOES_NOT_END_WITH_PERIOD

public static final String MSG_SUMMARY_SENTENCE_DOES_NOT_END_WITH_PERIOD

MSG_SUMMARY_SENTENCE_TOO_SHORT

public static final String MSG_SUMMARY_SENTENCE_TOO_SHORT

MSG_TAG_IMPROPER_ORDER

public static final String MSG_TAG_IMPROPER_ORDER

spellChecker

public static ItemCommentSpellCheck spellChecker

Constructor Details

ItemDocAnalyzer

public ItemDocAnalyzer(Report r,
                       net.sourceforge.pmd.ast.SimpleNode node)

Method Details

addDictionary

public static void addDictionary(String dictName)

addUndocumentedViolation

protected abstract void addUndocumentedViolation(String desc)
Adds a violation for this type of item, with the violation pointing to the name for this item.

checkForTagDescription

protected void checkForTagDescription(JavadocTaggedNode taggedNode,
                                      String msg)

checkJavadoc

protected void checkJavadoc(JavadocNode javadoc)

getEnclosingNode

protected abstract net.sourceforge.pmd.ast.SimpleNode getEnclosingNode()
Returns the node that contains the access and modifier tokens.

getItemType

protected abstract String getItemType()
Returns the type of item this analyzer is operating on.

getJavadoc

protected JavadocNode getJavadoc()
Returns the Javadoc for the given node. By default, this is parses from the whitespace immediately preceding this node. Other nodes might be nested under the node with the preceding Javadoc.

getNode

protected net.sourceforge.pmd.ast.SimpleNode getNode()

getValidTags

protected abstract List getValidTags()
Returns the valid tags, as strings, for this type of item.

run

public void run()
Runs the analysis. Should be invoked by either the constructors of concrete, final subclasses, or by the client.