forked from phoedos/pmd
Fix more javadoc errors
These worked with Java 21, but not with Java 11.
This commit is contained in:
@@ -84,12 +84,12 @@ public final class ApexMetrics {
|
||||
"Cyclomatic Complexity", "Cyclo");
|
||||
|
||||
/**
|
||||
* See the corresponding {@link net.sourceforge.pmd.lang.java.metrics.JavaMetrics.COGNITIVE_COMPLEXITY Cognitive Complexity}
|
||||
* See the corresponding Cognitive Complexity in pmd-java ({@code net.sourceforge.pmd.lang.java.metrics.JavaMetrics#COGNITIVE_COMPLEXITY})
|
||||
* for a general description.
|
||||
* <p>
|
||||
* The rule {@link net.sourceforge.pmd.lang.apex.rule.design.CognitiveComplexityRule CognitiveComplexity}
|
||||
*
|
||||
* <p>The rule {@link net.sourceforge.pmd.lang.apex.rule.design.CognitiveComplexityRule CognitiveComplexity}
|
||||
* by default reports methods with a complexity of 15 or more
|
||||
* and classes the have a total complexity (sum of all methods) of 50 or more.
|
||||
* and classes that have a total complexity (sum of all methods) of 50 or more.
|
||||
* These reported methods should be broken down into less complex components.
|
||||
*/
|
||||
public static final Metric<ApexNode<?>, Integer> COGNITIVE_COMPLEXITY =
|
||||
|
||||
@@ -25,15 +25,11 @@ import net.sourceforge.pmd.lang.java.ast.InternalInterfaces.BinaryExpressionLike
|
||||
* <p>Binary expressions are all left-associative, and are parsed left-recursively.
|
||||
* For example, the expression {@code 1 * 2 * 3 % 4} parses as the following tree:
|
||||
*
|
||||
* <p><figure>
|
||||
* <img src="doc-files/binaryExpr_70x.svg" alt="AST of the expression '1*2*3%4' in PMD 7" />
|
||||
* </figure>
|
||||
* <p><img src="doc-files/binaryExpr_70x.svg" alt="AST of the expression '1*2*3%4' in PMD 7">
|
||||
*
|
||||
* <p>In PMD 6.0.x, it would have parsed into the tree:
|
||||
*
|
||||
* <p><figure>
|
||||
* <img src="doc-files/binaryExpr_60x.svg" alt="AST of the expression '1*2*3%4' in PMD 6" />
|
||||
* </figure>
|
||||
* <p><img src="doc-files/binaryExpr_60x.svg" alt="AST of the expression '1*2*3%4' in PMD 6">
|
||||
*/
|
||||
public final class ASTInfixExpression extends AbstractJavaExpr implements BinaryExpressionLike, AtLeastOneChild {
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import net.sourceforge.pmd.lang.java.types.JTypeMirror;
|
||||
*
|
||||
* <pre class="grammar">
|
||||
*
|
||||
* LambdaExpression ::= {@link ASTLambdaParameterList LambdaParameterList} "->" ( {@link ASTExpression Expression} | {@link ASTBlock Block} )
|
||||
* LambdaExpression ::= {@link ASTLambdaParameterList LambdaParameterList} {@code "->"} ( {@link ASTExpression Expression} | {@link ASTBlock Block} )
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@@ -137,14 +137,14 @@ public final class JavaMetrics {
|
||||
* <p>Information about Cognitive complexity can be found in the original paper here:
|
||||
* <a href='https://www.sonarsource.com/docs/CognitiveComplexity.pdf'>CognitiveComplexity</a>
|
||||
*
|
||||
* <h4>Basic Idea</h4>
|
||||
* <p><strong>Basic Idea</strong></p>
|
||||
* <ol>
|
||||
* <li>Ignore structures that allow multiple statements to be readably shorthanded into one
|
||||
* <li>Increment (add one) for each break in the linear flow of the code
|
||||
* <li>Increment when flow-breaking structures are nested
|
||||
* </ol>
|
||||
*
|
||||
* <h4>Increments</h4>
|
||||
* <p><strong>Increments</strong></p>
|
||||
* There is an increment for each of the following:
|
||||
* <ul>
|
||||
* <li>`if`, `else if`, `else`, ternary operator
|
||||
@@ -157,7 +157,7 @@ public final class JavaMetrics {
|
||||
* <li>each method in a recursion cycle
|
||||
* </ul>
|
||||
*
|
||||
* <h4>Nesting level</h4>
|
||||
* <p><strong>Nesting level</strong></p>
|
||||
* The following structures increment the nesting level:
|
||||
* <ul>
|
||||
* <li>`if`, `else if`, `else`, ternary operator
|
||||
@@ -168,7 +168,7 @@ public final class JavaMetrics {
|
||||
* <li>nested methods and method-like structures such as lambdas
|
||||
* </ul>
|
||||
*
|
||||
* <h4>Nesting increments</h4>
|
||||
* <p><strong>Nesting increments</strong></p>
|
||||
* The following structures receive a nesting increment commensurate with their nested depth
|
||||
* inside nested structures:
|
||||
* <ul>
|
||||
@@ -179,8 +179,7 @@ public final class JavaMetrics {
|
||||
* <li>`catch`
|
||||
* </ul>
|
||||
*
|
||||
* <h4>Code example</h4>
|
||||
*
|
||||
* <p><strong>Code example</strong></p>
|
||||
* <pre>{@code
|
||||
* class Foo {
|
||||
* void myMethod () {
|
||||
|
||||
@@ -187,7 +187,7 @@ public final class TypesFromReflection {
|
||||
|
||||
/**
|
||||
* Load a class. Supports loading array types like 'java.lang.String[]' and
|
||||
* converting a canonical name to a binary name (eg 'java.util.Map.Entry' ->
|
||||
* converting a canonical name to a binary name (e.g. 'java.util.Map.Entry' ->
|
||||
* 'java.util.Map$Entry').
|
||||
*/
|
||||
public static @Nullable JTypeMirror loadType(TypeSystem ctr, String className) {
|
||||
@@ -196,7 +196,7 @@ public final class TypesFromReflection {
|
||||
|
||||
/**
|
||||
* Load a class. Supports loading array types like 'java.lang.String[]' and
|
||||
* converting a canonical name to a binary name (eg 'java.util.Map.Entry' ->
|
||||
* converting a canonical name to a binary name (e.g. 'java.util.Map.Entry' ->
|
||||
* 'java.util.Map$Entry'). Types that are not on the classpath may
|
||||
* be replaced by placeholder types if the {@link UnresolvedClassStore}
|
||||
* parameter is non-null.
|
||||
|
||||
@@ -36,21 +36,21 @@ public interface ResolutionResult<A extends ResolvableEntity> {
|
||||
/**
|
||||
* Whether any resolution candidate exists.
|
||||
*
|
||||
* @return getBestCandidates().size != 0
|
||||
* @return {@code getBestCandidates().size != 0}
|
||||
*/
|
||||
boolean isUnresolved();
|
||||
|
||||
/**
|
||||
* Whether the symbol resolver found multiple equally relevant resolution candidates.
|
||||
*
|
||||
* @return getBestCandidates().size > 1
|
||||
* @return {@code getBestCandidates().size > 1}
|
||||
*/
|
||||
boolean isClashed();
|
||||
|
||||
/**
|
||||
* Whether the symbol resolver found any symbol suspiciously hidden by other ones.
|
||||
*
|
||||
* @return getHiddenCandidates().size != 0
|
||||
* @return {@code getHiddenCandidates().size != 0}
|
||||
*/
|
||||
boolean hasHiddenResults();
|
||||
|
||||
|
||||
@@ -36,19 +36,17 @@ import com.github.stefanbirkner.systemlambda.SystemLambda;
|
||||
* <p>Usage template:
|
||||
*
|
||||
* <pre>
|
||||
* {@code
|
||||
* class MyPMDTaskTest extends AbstractAntTestHelper {
|
||||
* MyPMDTaskTest() {
|
||||
* antTestScriptFilename = "mypmdtasktest.xml";
|
||||
* }
|
||||
*
|
||||
* @Test
|
||||
* @Test
|
||||
* void myTest() {
|
||||
* executeTarget("testMyTarget");
|
||||
* assertOutputContaining("Expected Violation Message");
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @author Romain Pelisse <belaran@gmail.com>
|
||||
|
||||
Reference in New Issue
Block a user