org.incava.doctorj
Class ItemDocAnalyzer

java.lang.Object
  extended by org.incava.analysis.Analyzer
      extended by org.incava.doctorj.DocAnalyzer
          extended by org.incava.doctorj.ItemDocAnalyzer
Direct Known 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 java.lang.String MSG_DEPRECATED_WITHOUT_TEXT
           
static java.lang.String MSG_NO_SUMMARY_SENTENCE
           
static java.lang.String MSG_SEE_WITHOUT_REFERENCE
           
static java.lang.String MSG_SINCE_WITHOUT_TEXT
           
static java.lang.String MSG_SUMMARY_SENTENCE_DOES_NOT_END_WITH_PERIOD
           
static java.lang.String MSG_SUMMARY_SENTENCE_TOO_SHORT
           
static java.lang.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, SimpleNode node)
           
 
Method Summary
static void addDictionary(java.lang.String dictName)
           
protected abstract  void addUndocumentedViolation(java.lang.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, java.lang.String msg)
           
protected  void checkJavadoc(JavadocNode javadoc)
           
protected abstract  SimpleNode getEnclosingNode()
          Returns the node that contains the access and modifier tokens.
protected abstract  java.lang.String getItemType()
          Returns the type of item this analyzer is operating on.
protected  JavadocNode getJavadoc()
          Returns the Javadoc for the given node.
protected  SimpleNode getNode()
           
protected abstract  java.util.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, getReport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MSG_NO_SUMMARY_SENTENCE

public static final java.lang.String MSG_NO_SUMMARY_SENTENCE
See Also:
Constant Field Values

MSG_SUMMARY_SENTENCE_DOES_NOT_END_WITH_PERIOD

public static final java.lang.String MSG_SUMMARY_SENTENCE_DOES_NOT_END_WITH_PERIOD
See Also:
Constant Field Values

MSG_SUMMARY_SENTENCE_TOO_SHORT

public static final java.lang.String MSG_SUMMARY_SENTENCE_TOO_SHORT
See Also:
Constant Field Values

MSG_SEE_WITHOUT_REFERENCE

public static final java.lang.String MSG_SEE_WITHOUT_REFERENCE
See Also:
Constant Field Values

MSG_SINCE_WITHOUT_TEXT

public static final java.lang.String MSG_SINCE_WITHOUT_TEXT
See Also:
Constant Field Values

MSG_DEPRECATED_WITHOUT_TEXT

public static final java.lang.String MSG_DEPRECATED_WITHOUT_TEXT
See Also:
Constant Field Values

MSG_TAG_IMPROPER_ORDER

public static final java.lang.String MSG_TAG_IMPROPER_ORDER
See Also:
Constant Field Values

CHKLVL_SUMMARY_SENTENCE

protected static final int CHKLVL_SUMMARY_SENTENCE
See Also:
Constant Field Values

CHKLVL_MISORDERED_TAGS

protected static final int CHKLVL_MISORDERED_TAGS
See Also:
Constant Field Values

CHKLVL_VALID_TAGS

protected static final int CHKLVL_VALID_TAGS
See Also:
Constant Field Values

spellChecker

public static ItemCommentSpellCheck spellChecker
Constructor Detail

ItemDocAnalyzer

public ItemDocAnalyzer(Report r,
                       SimpleNode node)
Method Detail

addDictionary

public static void addDictionary(java.lang.String dictName)

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.


getEnclosingNode

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


run

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


addUndocumentedViolation

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


checkJavadoc

protected void checkJavadoc(JavadocNode javadoc)

checkForTagDescription

protected void checkForTagDescription(JavadocTaggedNode taggedNode,
                                      java.lang.String msg)

getNode

protected SimpleNode getNode()

getItemType

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


getValidTags

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