From 68a63609ce5ce46ab20cdc5434cd627d22087e14 Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Thu, 2 Jan 2025 17:14:28 -0800 Subject: [PATCH] Fix Javadoc links (#1040) --- .../index/upperbound/UpperBoundTransfer.java | 22 ++++++++----- .../cfg/builder/UnconditionalJump.java | 2 +- .../common/basetype/BaseTypeVisitor.java | 2 +- .../framework/type/AnnotatedTypeMirror.java | 31 ++++++++++--------- 4 files changed, 32 insertions(+), 25 deletions(-) diff --git a/checker/src/main/java/org/checkerframework/checker/index/upperbound/UpperBoundTransfer.java b/checker/src/main/java/org/checkerframework/checker/index/upperbound/UpperBoundTransfer.java index b0ccca0ff3a..37fe1b85bab 100644 --- a/checker/src/main/java/org/checkerframework/checker/index/upperbound/UpperBoundTransfer.java +++ b/checker/src/main/java/org/checkerframework/checker/index/upperbound/UpperBoundTransfer.java @@ -175,10 +175,16 @@ public TransferResult visitAssignment( * {@code node} is known to be {@code typeOfNode}. If the node is a plus or a minus then the * types of the left and right operands can be refined to include offsets. If the node is a * multiplication, its operands can also be refined. See {@link - * #propagateToAdditionOperand(LessThanLengthOf, Node, Node, TransferInput, CFStore)}, {@link - * #propagateToSubtractionOperands(LessThanLengthOf, NumericalSubtractionNode, TransferInput, - * CFStore)}, and {@link #propagateToMultiplicationOperand(LessThanLengthOf, Node, Node, - * TransferInput, CFStore)} for details. + * #propagateToAdditionOperand(UBQualifier.LessThanLengthOf, Node, Node, TransferInput, + * CFStore)}, {@link #propagateToSubtractionOperands(UBQualifier.LessThanLengthOf, + * NumericalSubtractionNode, TransferInput, CFStore)}, and {@link + * #propagateToMultiplicationOperand(UBQualifier.LessThanLengthOf, Node, Node, TransferInput, + * CFStore)} for details. + * + * @param typeOfNode type of node + * @param node the node + * @param in the TransferInput before propagate to this operand + * @param store location to store the refined type */ private void propagateToOperands( LessThanLengthOf typeOfNode, @@ -234,10 +240,10 @@ private void propagateToMultiplicationOperand( * *

This means that the left node is less than or equal to the length of the array when the * right node is subtracted from the left node. Note that unlike {@link - * #propagateToAdditionOperand(LessThanLengthOf, Node, Node, TransferInput, CFStore)} and {@link - * #propagateToMultiplicationOperand(LessThanLengthOf, Node, Node, TransferInput, CFStore)}, - * this method takes the NumericalSubtractionNode instead of the two operand nodes. This - * implements case 4. + * #propagateToAdditionOperand(UBQualifier.LessThanLengthOf, Node, Node, TransferInput, + * CFStore)} and {@link #propagateToMultiplicationOperand(UBQualifier.LessThanLengthOf, Node, + * Node, TransferInput, CFStore)}, this method takes the NumericalSubtractionNode instead of the + * two operand nodes. This implements case 4. * * @param typeOfSubtraction type of node * @param node subtraction node that has typeOfSubtraction diff --git a/dataflow/src/main/java/org/checkerframework/dataflow/cfg/builder/UnconditionalJump.java b/dataflow/src/main/java/org/checkerframework/dataflow/cfg/builder/UnconditionalJump.java index 0d92c27ac88..df1749339db 100644 --- a/dataflow/src/main/java/org/checkerframework/dataflow/cfg/builder/UnconditionalJump.java +++ b/dataflow/src/main/java/org/checkerframework/dataflow/cfg/builder/UnconditionalJump.java @@ -52,7 +52,7 @@ public FlowRule getFlowRule() { * Produce a string representation. * * @return a string representation - * @see org.checkerframework.dataflow.cfg.builder.CFGBuilder.PhaseOneResult#nodeToString + * @see org.checkerframework.dataflow.cfg.builder.PhaseOneResult#nodeToString */ @Override public String toString() { diff --git a/framework/src/main/java/org/checkerframework/common/basetype/BaseTypeVisitor.java b/framework/src/main/java/org/checkerframework/common/basetype/BaseTypeVisitor.java index 21f5bbaf089..6cb489b93f6 100644 --- a/framework/src/main/java/org/checkerframework/common/basetype/BaseTypeVisitor.java +++ b/framework/src/main/java/org/checkerframework/common/basetype/BaseTypeVisitor.java @@ -3815,7 +3815,7 @@ protected void reportMethodInvocabilityError( * constructor result type. This is equivalent to down-casting. * *

For type checking of the enclosing expression of inner type instantiations, see {@link - * #checkEnclosingExpr(NewClassTree, AnnotatedExecutableType)} + * #checkEnclosingExpr(NewClassTree, AnnotatedTypeMirror.AnnotatedExecutableType)} * * @param invocation the AnnotatedDeclaredType of the constructor invocation * @param constructor the AnnotatedExecutableType of the constructor declaration diff --git a/framework/src/main/java/org/checkerframework/framework/type/AnnotatedTypeMirror.java b/framework/src/main/java/org/checkerframework/framework/type/AnnotatedTypeMirror.java index afef59f6f87..99bd9f76596 100644 --- a/framework/src/main/java/org/checkerframework/framework/type/AnnotatedTypeMirror.java +++ b/framework/src/main/java/org/checkerframework/framework/type/AnnotatedTypeMirror.java @@ -1213,7 +1213,7 @@ private AnnotatedExecutableType(ExecutableType type, AnnotatedTypeFactory factor /** The parameter types; an unmodifiable list. */ private @MonotonicNonNull List paramTypes = null; - /** Whether {@link paramTypes} has been computed. */ + /** Whether {@link #paramTypes} has been computed. */ private boolean paramTypesComputed = false; /** @@ -1223,32 +1223,33 @@ private AnnotatedExecutableType(ExecutableType type, AnnotatedTypeFactory factor private @Nullable AnnotatedDeclaredType receiverType; /** - * The varargs type is the last element of {@link paramTypes} if the method or constructor - * accepts a variable number of arguments and the {@link paramTypes} has not been expanded + * The varargs type is the last element of {@link #paramTypes} if the method or constructor + * accepts a variable number of arguments and the {@link #paramTypes} has not been expanded * yet. This type needs to be stored in the field to avoid being affected by calling {@link - * AnnotatedTypes#adaptParameters(AnnotatedTypeFactory, AnnotatedExecutableType, List)}. + * AnnotatedTypes#adaptParameters(AnnotatedTypeFactory, + * AnnotatedTypeMirror.AnnotatedExecutableType, List, com.sun.source.tree.NewClassTree)}. */ private @MonotonicNonNull AnnotatedArrayType varargType = null; - /** Whether {@link receiverType} has been computed. */ + /** Whether {@link #receiverType} has been computed. */ private boolean receiverTypeComputed = false; /** The return type. */ private AnnotatedTypeMirror returnType; - /** Whether {@link returnType} has been computed. */ + /** Whether {@link #returnType} has been computed. */ private boolean returnTypeComputed = false; /** The thrown types; an unmodifiable list. */ private List thrownTypes; - /** Whether {@link thrownTypes} has been computed. */ + /** Whether {@link #thrownTypes} has been computed. */ private boolean thrownTypesComputed = false; /** The type variables; an unmodifiable list. */ private List typeVarTypes; - /** Whether {@link typeVarTypes} has been computed. */ + /** Whether {@link #typeVarTypes} has been computed. */ private boolean typeVarTypesComputed = false; /** @@ -1285,7 +1286,7 @@ public void addAnnotation(AnnotationMirror annotation) { /** * Sets the parameter types of this executable type, excluding the receiver.If paramTypes * has been computed and this type is a varargs method, computes and store {@link - * varargType} before calling this method, @see {@link varargType} + * #varargType} before calling this method, @see {@link #varargType} * * @param params an unmodifiable list of parameter types to be captured by this method, * excluding the receiver @@ -1344,11 +1345,11 @@ public List getParameterTypes() { } /** - * Computes the vararg type of this executable type and stores it in {@link varargType}. + * Computes the vararg type of this executable type and stores it in {@link #varargType}. * - *

This method computes {@link varargType} using the {@link paramTypes} of this - * executable type. To use the {@link paramTypes} from different executable type, use {@link - * #computeVarargType(AnnotatedExecutableType)}. + *

This method computes {@link #varargType} using the {@link #paramTypes} of this + * executable type. To use the {@link #paramTypes} from different executable type, use + * {@link #computeVarargType(AnnotatedTypeMirror.AnnotatedExecutableType)}. */ /*package-private*/ void computeVarargType() { computeVarargType(paramTypes); @@ -1356,7 +1357,7 @@ public List getParameterTypes() { /** * Computes the vararg type using the passed executable type and stores it in this {@link - * varargType}. + * #varargType}. * * @param annotatedExecutableType an AnnotatedExecutableType */ @@ -1367,7 +1368,7 @@ public List getParameterTypes() { /** * Helper function for {@link #computeVarargType()} and {@link - * #computeVarargType(AnnotatedExecutableType)}. + * #computeVarargType(AnnotatedTypeMirror.AnnotatedExecutableType)}. * * @param paramTypes the parameter types to determine the vararg type */