org.incava.doctorj

Class ItemDocAnalyzer

public abstract class ItemDocAnalyzer extends DocAnalyzer

Analyzes Javadoc and code.
Field Summary
protected static intCHKLVL_MISORDERED_TAGS
protected static intCHKLVL_SUMMARY_SENTENCE
protected static intCHKLVL_VALID_TAGS
static StringMSG_DEPRECATED_WITHOUT_TEXT
static StringMSG_NO_SUMMARY_SENTENCE
static StringMSG_SEE_WITHOUT_REFERENCE
static StringMSG_SINCE_WITHOUT_TEXT
static StringMSG_SUMMARY_SENTENCE_DOES_NOT_END_WITH_PERIOD
static StringMSG_SUMMARY_SENTENCE_TOO_SHORT
static StringMSG_TAG_IMPROPER_ORDER
static ItemCommentSpellCheckspellChecker
Constructor Summary
ItemDocAnalyzer(Report r, SimpleNode node)
Method Summary
static voidaddDictionary(String dictName)
protected abstract voidaddUndocumentedViolation(String desc)
Adds a violation for this type of item, with the violation pointing to the name for this item.
protected voidcheckForTagDescription(JavadocTaggedNode taggedNode, String msg)
protected voidcheckJavadoc(JavadocNode javadoc)
protected abstract SimpleNodegetEnclosingNode()
Returns the node that contains the access and modifier tokens.
protected abstract StringgetItemType()
Returns the type of item this analyzer is operating on.
protected JavadocNodegetJavadoc()
Returns the Javadoc for the given node.
protected SimpleNodegetNode()
protected abstract ListgetValidTags()
Returns the valid tags, as strings, for this type of item.
voidrun()
Runs the analysis.

Field Detail

CHKLVL_MISORDERED_TAGS

protected static final int CHKLVL_MISORDERED_TAGS

CHKLVL_SUMMARY_SENTENCE

protected static final int CHKLVL_SUMMARY_SENTENCE

CHKLVL_VALID_TAGS

protected static final int CHKLVL_VALID_TAGS

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 Detail

ItemDocAnalyzer

public ItemDocAnalyzer(Report r, SimpleNode node)

Method Detail

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 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 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.