Commit 7a469bc9 authored by Eric Bruneton's avatar Eric Bruneton

Small Javadoc improvements.

parent 11dedfd2
Pipeline #4568 passed with stage
in 11 minutes and 13 seconds
......@@ -2335,7 +2335,7 @@ public class ClassFile {
private abstract static class AbstractBuilder<T> implements ClassContext, MethodContext {
/** Flag used to distinguish CpInfo keys in {@link #context}. */
private static final int CP_INFO_KEY = 0xF0000000;
/** The parent node of this node. May be null. */
/** The parent node of this node. May be {@literal null}. */
private final AbstractBuilder<?> parent;
/** The children of this builder. */
final ArrayList<T> children;
......
......@@ -684,7 +684,7 @@ public abstract class Printer {
/**
* Method parameter. See {@link org.objectweb.asm.MethodVisitor#visitParameter(String, int)}.
*
* @param name parameter name or null if none is provided.
* @param name parameter name or {@literal null} if none is provided.
* @param access the parameter's access flags, only {@code ACC_FINAL}, {@code ACC_SYNTHETIC}
* or/and {@code ACC_MANDATED} are allowed (see {@link Opcodes}).
*/
......
......@@ -43,7 +43,10 @@ public abstract class AnnotationVisitor {
*/
protected final int api;
/** The annotation visitor to which this visitor must delegate method calls. May be null. */
/**
* The annotation visitor to which this visitor must delegate method calls. May be {@literal
* null}.
*/
protected AnnotationVisitor av;
/**
......@@ -62,7 +65,7 @@ public abstract class AnnotationVisitor {
* @param api the ASM API version implemented by this visitor. Must be one of {@link
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* @param annotationVisitor the annotation visitor to which this visitor must delegate method
* calls. May be null.
* calls. May be {@literal null}.
*/
public AnnotationVisitor(final int api, final AnnotationVisitor annotationVisitor) {
if (api != Opcodes.ASM7 && api != Opcodes.ASM6 && api != Opcodes.ASM5 && api != Opcodes.ASM4) {
......
......@@ -104,8 +104,8 @@ final class AnnotationWriter extends AnnotationVisitor {
* the visited content must be stored. This ByteVector must already contain all the fields of
* the structure except the last one (the element_value_pairs array).
* @param previousAnnotation the previously visited annotation of the
* Runtime[In]Visible[Type]Annotations attribute to which this annotation belongs, or null in
* other cases (e.g. nested or array annotations).
* Runtime[In]Visible[Type]Annotations attribute to which this annotation belongs, or
* {@literal null} in other cases (e.g. nested or array annotations).
*/
AnnotationWriter(
final SymbolTable symbolTable,
......@@ -130,8 +130,8 @@ final class AnnotationWriter extends AnnotationVisitor {
* @param symbolTable where the constants used in this AnnotationWriter must be stored.
* @param descriptor the class descriptor of the annotation class.
* @param previousAnnotation the previously visited annotation of the
* Runtime[In]Visible[Type]Annotations attribute to which this annotation belongs, or null in
* other cases (e.g. nested or array annotations).
* Runtime[In]Visible[Type]Annotations attribute to which this annotation belongs, or
* {@literal null} in other cases (e.g. nested or array annotations).
* @return a new {@link AnnotationWriter} for the given annotation descriptor.
*/
static AnnotationWriter create(
......@@ -160,8 +160,8 @@ final class AnnotationWriter extends AnnotationVisitor {
* 'typeRef' as a whole.
* @param descriptor the class descriptor of the annotation class.
* @param previousAnnotation the previously visited annotation of the
* Runtime[In]Visible[Type]Annotations attribute to which this annotation belongs, or null in
* other cases (e.g. nested or array annotations).
* Runtime[In]Visible[Type]Annotations attribute to which this annotation belongs, or
* {@literal null} in other cases (e.g. nested or array annotations).
* @return a new {@link AnnotationWriter} for the given type annotation reference and descriptor.
*/
static AnnotationWriter create(
......@@ -324,7 +324,7 @@ final class AnnotationWriter extends AnnotationVisitor {
* and all its <i>predecessors</i> (see {@link #previousAnnotation}. Also adds the attribute name
* to the constant pool of the class (if not null).
*
* @param attributeName one of "Runtime[In]Visible[Type]Annotations", or null.
* @param attributeName one of "Runtime[In]Visible[Type]Annotations", or {@literal null}.
* @return the size in bytes of a Runtime[In]Visible[Type]Annotations attribute containing this
* annotation and all its predecessors. This includes the size of the attribute_name_index and
* attribute_length fields.
......
......@@ -28,7 +28,7 @@
package org.objectweb.asm;
/**
* A non standard class, field, method or code attribute, as defined in the Java Virtual Machine
* A non standard class, field, method or Code attribute, as defined in the Java Virtual Machine
* Specification (JVMS).
*
* @see <a href= "https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7">JVMS
......@@ -52,7 +52,7 @@ public class Attribute {
/**
* The next attribute in this attribute list (Attribute instances can be linked via this field to
* store a list of class, field, method or code attributes). May be {@literal null}.
* store a list of class, field, method or Code attributes). May be {@literal null}.
*/
Attribute nextAttribute;
......@@ -80,9 +80,9 @@ public class Attribute {
}
/**
* Returns {@literal true} if this type of attribute is a code attribute.
* Returns {@literal true} if this type of attribute is a Code attribute.
*
* @return {@literal true} if this type of attribute is a code attribute.
* @return {@literal true} if this type of attribute is a Code attribute.
*/
public boolean isCodeAttribute() {
return false;
......@@ -92,7 +92,7 @@ public class Attribute {
* Returns the labels corresponding to this attribute.
*
* @return the labels corresponding to this attribute, or {@literal null} if this attribute is not
* a code attribute that contains labels.
* a Code attribute that contains labels.
*/
protected Label[] getLabels() {
return new Label[0];
......@@ -111,11 +111,11 @@ public class Attribute {
* @param charBuffer the buffer to be used to call the ClassReader methods requiring a
* 'charBuffer' parameter.
* @param codeAttributeOffset index of the first byte of content of the enclosing Code attribute
* in {@link ClassReader}, or -1 if the attribute to be read is not a code attribute. The 6
* in {@link ClassReader}, or -1 if the attribute to be read is not a Code attribute. The 6
* attribute header bytes (attribute_name_index and attribute_length) are not taken into
* account here.
* @param labels the labels of the method's code, or {@literal null} if the attribute to be read
* is not a code attribute.
* is not a Code attribute.
* @return a <i>new</i> {@link Attribute} object corresponding to the specified bytes.
*/
protected Attribute read(
......@@ -138,16 +138,16 @@ public class Attribute {
*
* @param classWriter the class to which this attribute must be added. This parameter can be used
* to add the items that corresponds to this attribute to the constant pool of this class.
* @param code the bytecode of the method corresponding to this code attribute, or {@literal null}
* if this attribute is not a code attribute. Corresponds to the 'code' field of the Code
* @param code the bytecode of the method corresponding to this Code attribute, or {@literal null}
* if this attribute is not a Code attribute. Corresponds to the 'code' field of the Code
* attribute.
* @param codeLength the length of the bytecode of the method corresponding to this code
* attribute, or 0 if this attribute is not a code attribute. Corresponds to the 'code_length'
* attribute, or 0 if this attribute is not a Code attribute. Corresponds to the 'code_length'
* field of the Code attribute.
* @param maxStack the maximum stack size of the method corresponding to this code attribute, or
* -1 if this attribute is not a code attribute.
* @param maxStack the maximum stack size of the method corresponding to this Code attribute, or
* -1 if this attribute is not a Code attribute.
* @param maxLocals the maximum number of local variables of the method corresponding to this code
* attribute, or -1 if this attribute is not a code attribute.
* attribute, or -1 if this attribute is not a Code attribute.
* @return the byte array form of this attribute.
*/
protected ByteVector write(
......@@ -197,16 +197,16 @@ public class Attribute {
* attribute_length) per attribute. Also adds the attribute type names to the constant pool.
*
* @param symbolTable where the constants used in the attributes must be stored.
* @param code the bytecode of the method corresponding to these code attributes, or {@literal
* null} if they are not code attributes. Corresponds to the 'code' field of the Code
* @param code the bytecode of the method corresponding to these Code attributes, or {@literal
* null} if they are not Code attributes. Corresponds to the 'code' field of the Code
* attribute.
* @param codeLength the length of the bytecode of the method corresponding to these code
* attributes, or 0 if they are not code attributes. Corresponds to the 'code_length' field of
* attributes, or 0 if they are not Code attributes. Corresponds to the 'code_length' field of
* the Code attribute.
* @param maxStack the maximum stack size of the method corresponding to these code attributes, or
* -1 if they are not code attributes.
* @param maxStack the maximum stack size of the method corresponding to these Code attributes, or
* -1 if they are not Code attributes.
* @param maxLocals the maximum number of local variables of the method corresponding to these
* code attributes, or -1 if they are not code attribute.
* Code attributes, or -1 if they are not Code attribute.
* @return the size of all the attributes in this attribute list. This size includes the size of
* the attribute headers.
*/
......@@ -285,16 +285,16 @@ public class Attribute {
* attribute.
*
* @param symbolTable where the constants used in the attributes must be stored.
* @param code the bytecode of the method corresponding to these code attributes, or {@literal
* null} if they are not code attributes. Corresponds to the 'code' field of the Code
* @param code the bytecode of the method corresponding to these Code attributes, or {@literal
* null} if they are not Code attributes. Corresponds to the 'code' field of the Code
* attribute.
* @param codeLength the length of the bytecode of the method corresponding to these code
* attributes, or 0 if they are not code attributes. Corresponds to the 'code_length' field of
* attributes, or 0 if they are not Code attributes. Corresponds to the 'code_length' field of
* the Code attribute.
* @param maxStack the maximum stack size of the method corresponding to these code attributes, or
* -1 if they are not code attributes.
* @param maxStack the maximum stack size of the method corresponding to these Code attributes, or
* -1 if they are not Code attributes.
* @param maxLocals the maximum number of local variables of the method corresponding to these
* code attributes, or -1 if they are not code attribute.
* Code attributes, or -1 if they are not Code attribute.
* @param output where the attributes must be written.
*/
final void putAttributes(
......
......@@ -705,7 +705,8 @@ public class ClassReader {
* attribute_name_index and attribute_length fields).
* @param modulePackagesOffset the offset of the ModulePackages attribute (excluding the
* attribute_info's attribute_name_index and attribute_length fields), or 0.
* @param moduleMainClass the string corresponding to the ModuleMainClass attribute, or null.
* @param moduleMainClass the string corresponding to the ModuleMainClass attribute, or {@literal
* null}.
*/
private void readModuleAttributes(
final ClassVisitor classVisitor,
......@@ -2593,7 +2594,7 @@ public class ClassReader {
* -1 if there is no such type_annotation of if it does not have a bytecode offset.
*
* @param typeAnnotationOffsets the offset of each 'type_annotation' entry in a
* Runtime[In]VisibleTypeAnnotations attribute, or null.
* Runtime[In]VisibleTypeAnnotations attribute, or {@literal null}.
* @param typeAnnotationIndex the index a 'type_annotation' entry in typeAnnotationOffsets.
* @return bytecode offset corresponding to the specified JVMS 'type_annotation' structure, or -1
* if there is no such type_annotation of if it does not have a bytecode offset.
......
......@@ -44,7 +44,7 @@ public abstract class ClassVisitor {
*/
protected final int api;
/** The class visitor to which this visitor must delegate method calls. May be null. */
/** The class visitor to which this visitor must delegate method calls. May be {@literal null}. */
protected ClassVisitor cv;
/**
......
......@@ -42,7 +42,7 @@ public abstract class FieldVisitor {
*/
protected final int api;
/** The field visitor to which this visitor must delegate method calls. May be null. */
/** The field visitor to which this visitor must delegate method calls. May be {@literal null}. */
protected FieldVisitor fv;
/**
......
......@@ -89,9 +89,9 @@ package org.objectweb.asm;
* <p>Output frames can contain abstract types of any kind and with a positive or negative array
* dimension (and even unassigned types, represented by 0 - which does not correspond to any valid
* abstract type value). Input frames can only contain CONSTANT_KIND, REFERENCE_KIND or
* UNINITIALIZED_KIND abstract types of positive or null array dimension. In all cases the type
* table contains only internal type names (array type descriptors are forbidden - array dimensions
* must be represented through the DIM field).
* UNINITIALIZED_KIND abstract types of positive or {@literal null} array dimension. In all cases
* the type table contains only internal type names (array type descriptors are forbidden - array
* dimensions must be represented through the DIM field).
*
* <p>The LONG and DOUBLE types are always represented by using two slots (LONG + TOP or DOUBLE +
* TOP), for local variables as well as in the operand stack. This is necessary to be able to
......@@ -1253,10 +1253,10 @@ class Frame {
* @param symbolTable the type table to use to lookup and store type {@link Symbol}.
* @param sourceType the abstract type with which the abstract type array element must be merged.
* This type should be of {@link #CONSTANT_KIND}, {@link #REFERENCE_KIND} or {@link
* #UNINITIALIZED_KIND} kind, with positive or null array dimensions.
* #UNINITIALIZED_KIND} kind, with positive or {@literal null} array dimensions.
* @param dstTypes an array of abstract types. These types should be of {@link #CONSTANT_KIND},
* {@link #REFERENCE_KIND} or {@link #UNINITIALIZED_KIND} kind, with positive or null array
* dimensions.
* {@link #REFERENCE_KIND} or {@link #UNINITIALIZED_KIND} kind, with positive or {@literal
* null} array dimensions.
* @param dstIndex the index of the type that must be merged in dstTypes.
* @return {@literal true} if the type array has been modified by this operation.
*/
......
......@@ -227,7 +227,8 @@ public class Label {
/**
* The maximum height reached by the output stack, relatively to the top of the input stack, in
* the basic block corresponding to this label. This maximum is always positive or null.
* the basic block corresponding to this label. This maximum is always positive or {@literal
* null}.
*/
short outputStackMax;
......@@ -264,12 +265,12 @@ public class Label {
Edge outgoingEdges;
/**
* The next element in the list of labels to which this label belongs, or null if it does not
* belong to any list. All lists of labels must end with the {@link #EMPTY_LIST} sentinel, in
* order to ensure that this field is null if and only if this label does not belong to a list of
* labels. Note that there can be several lists of labels at the same time, but that a label can
* belong to at most one list at a time (unless some lists share a common tail, but this is not
* used in practice).
* The next element in the list of labels to which this label belongs, or {@literal null} if it
* does not belong to any list. All lists of labels must end with the {@link #EMPTY_LIST}
* sentinel, in order to ensure that this field is null if and only if this label does not belong
* to a list of labels. Note that there can be several lists of labels at the same time, but that
* a label can belong to at most one list at a time (unless some lists share a common tail, but
* this is not used in practice).
*
* <p>List of labels are used in {@link MethodWriter#computeAllFrames} and {@link
* MethodWriter#computeMaxStackAndLocal} to compute stack map frames and the maximum stack size,
......
......@@ -56,7 +56,9 @@ public abstract class MethodVisitor {
*/
protected final int api;
/** The method visitor to which this visitor must delegate method calls. May be null. */
/**
* The method visitor to which this visitor must delegate method calls. May be {@literal null}.
*/
protected MethodVisitor mv;
/**
......@@ -92,7 +94,7 @@ public abstract class MethodVisitor {
/**
* Visits a parameter of this method.
*
* @param name parameter name or null if none is provided.
* @param name parameter name or {@literal null} if none is provided.
* @param access the parameter's access flags, only {@code ACC_FINAL}, {@code ACC_SYNTHETIC}
* or/and {@code ACC_MANDATED} are allowed (see {@link Opcodes}).
*/
......
......@@ -42,7 +42,9 @@ public abstract class ModuleVisitor {
*/
protected final int api;
/** The module visitor to which this visitor must delegate method calls. May be null. */
/**
* The module visitor to which this visitor must delegate method calls. May be {@literal null}.
*/
protected ModuleVisitor mv;
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment