org.incava.doctorj

Class MethodDocAnalyzer


public class MethodDocAnalyzer
extends FunctionDocAnalyzer

Analyzes Javadoc and code for methods.

Field Summary

static String
MSG_RETURN_FOR_VOID_METHOD
static String
MSG_RETURN_TYPE_USED
static String
MSG_RETURN_WITHOUT_DESCRIPTION

Fields inherited from class org.incava.doctorj.FunctionDocAnalyzer

MSG_SERIALDATA_WITHOUT_DESCRIPTION

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

MethodDocAnalyzer(Report r, net.sourceforge.pmd.ast.ASTMethodDeclaration method)

Method Summary

protected void
addUndocumentedViolation(String desc)
Adds a violation for a method, with the violation pointing to the method name.
protected void
checkJavadoc(JavadocNode javadoc)
protected net.sourceforge.pmd.ast.SimpleNode
getEnclosingNode()
Returns the parent node, which is the enclosing declaration.
String
getItemType()
Returns the type of item this analyzer is operating on.
protected net.sourceforge.pmd.ast.ASTFormalParameters
getParameterList()
Returns the parameter list for the method.
protected List
getValidTags()
Returns the valid tags, as strings, for methods.

Methods inherited from class org.incava.doctorj.FunctionDocAnalyzer

checkJavadoc, getParameterList

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_RETURN_FOR_VOID_METHOD

public static final String MSG_RETURN_FOR_VOID_METHOD

MSG_RETURN_TYPE_USED

public static final String MSG_RETURN_TYPE_USED

MSG_RETURN_WITHOUT_DESCRIPTION

public static final String MSG_RETURN_WITHOUT_DESCRIPTION

Constructor Details

MethodDocAnalyzer

public MethodDocAnalyzer(Report r,
                         net.sourceforge.pmd.ast.ASTMethodDeclaration method)

Method Details

addUndocumentedViolation

protected void addUndocumentedViolation(String desc)
Adds a violation for a method, with the violation pointing to the method name.
Overrides:
addUndocumentedViolation in interface ItemDocAnalyzer

checkJavadoc

protected void checkJavadoc(JavadocNode javadoc)
Overrides:
checkJavadoc in interface FunctionDocAnalyzer

getEnclosingNode

protected net.sourceforge.pmd.ast.SimpleNode getEnclosingNode()
Returns the parent node, which is the enclosing declaration.
Overrides:
getEnclosingNode in interface ItemDocAnalyzer

getItemType

public String getItemType()
Returns the type of item this analyzer is operating on.
Overrides:
getItemType in interface ItemDocAnalyzer

getParameterList

protected net.sourceforge.pmd.ast.ASTFormalParameters getParameterList()
Returns the parameter list for the method.
Overrides:
getParameterList in interface FunctionDocAnalyzer

getValidTags

protected List getValidTags()
Returns the valid tags, as strings, for methods.
Overrides:
getValidTags in interface ItemDocAnalyzer