org.incava.doctorj
Class ParameterDocAnalyzer
public class ParameterDocAnalyzer
Checks the validity of Javadoc for a list of parameters.
ParameterDocAnalyzer(Report report, JavadocNode javadoc, net.sourceforge.pmd.ast.SimpleNode function, net.sourceforge.pmd.ast.ASTFormalParameters parameterList, int nodeLevel) - Creates and runs the parameter documentation analyzer.
|
CHKLVL_PARAM_DOC_EXISTS
protected static final int CHKLVL_PARAM_DOC_EXISTS
The warning level for checking for the existence of Javadoc for
parameters.
MSG_PARAMETERS_DOCUMENTED_BUT_NO_CODE_PARAMETERS
public static final String MSG_PARAMETERS_DOCUMENTED_BUT_NO_CODE_PARAMETERS
The message for documented parameters for a function without any in the
code.
MSG_PARAMETER_MISSPELLED
public static final String MSG_PARAMETER_MISSPELLED
The message for a parameter being apparently misspelled from that in the
code.
MSG_PARAMETER_NOT_DOCUMENTED
public static final String MSG_PARAMETER_NOT_DOCUMENTED
The message for an undocumented code parameter.
MSG_PARAMETER_NOT_IN_CODE
public static final String MSG_PARAMETER_NOT_IN_CODE
The message for a documented parameter not found in the code.
MSG_PARAMETER_NOT_IN_CODE_ORDER
public static final String MSG_PARAMETER_NOT_IN_CODE_ORDER
The message for parameters being misordered with regard to the code.
MSG_PARAMETER_REPEATED
public static final String MSG_PARAMETER_REPEATED
The message for a repeated documented parameter.
MSG_PARAMETER_TYPE_USED
public static final String MSG_PARAMETER_TYPE_USED
The message for a parameter referring to argument type, not name.
MSG_PARAMETER_WITHOUT_DESCRIPTION
public static final String MSG_PARAMETER_WITHOUT_DESCRIPTION
The message for a parameter field without a description.
MSG_PARAMETER_WITHOUT_NAME
public static final String MSG_PARAMETER_WITHOUT_NAME
The message for a parameter field without a name.
ParameterDocAnalyzer
public ParameterDocAnalyzer(Report report,
JavadocNode javadoc,
net.sourceforge.pmd.ast.SimpleNode function,
net.sourceforge.pmd.ast.ASTFormalParameters parameterList,
int nodeLevel)
Creates and runs the parameter documentation analyzer.
report
- The report to which to send violations.javadoc
- The javadoc for the function. Should not be null.function
- The constructor or method.
addDocumentedParameter
protected void addDocumentedParameter(int index,
Location start,
Location end)
getClosestMatchingParameter
protected int getClosestMatchingParameter(String str)
Returns the first param in the list whose name most closely matches the
given string.
getMatchingParameter
protected int getMatchingParameter(String str)
Returns the first param in the list whose name matches the given string.
reportUndocumentedParameters
protected void reportUndocumentedParameters()
run
public void run()
Analyzes the Javadoc for the parameter list.