Commit f912f474 authored by Eric Bruneton's avatar Eric Bruneton
Browse files

Small Javadoc improvements and fixes.

parent d51146fc
Pipeline #20624 passed with stage
in 10 minutes and 37 seconds
......@@ -510,7 +510,7 @@ public class Analyzer<V extends Value> implements Opcodes {
/**
* Initializes this analyzer. This method is called just before the execution of control flow
* analysis loop in #analyze. The default implementation of this method does nothing.
* analysis loop in {@link #analyze}. The default implementation of this method does nothing.
*
* @param owner the internal name of the class to which the method belongs.
* @param method the method to be analyzed.
......
......@@ -88,7 +88,10 @@ public abstract class AbstractInsnNode {
/** The type of {@link LineNumberNode} "instructions". */
public static final int LINE = 15;
/** The opcode of this instruction. */
/**
* The opcode of this instruction, or -1 if this is not a JVM instruction (e.g. a label or a line
* number).
*/
protected int opcode;
/**
......@@ -131,7 +134,8 @@ public abstract class AbstractInsnNode {
/**
* Returns the opcode of this instruction.
*
* @return the opcode of this instruction.
* @return the opcode of this instruction, or -1 if this is not a JVM instruction (e.g. a label or
* a line number).
*/
public int getOpcode() {
return opcode;
......
......@@ -79,14 +79,18 @@ public class FrameNode extends AbstractInsnNode {
* @param type the type of this frame. Must be {@link Opcodes#F_NEW} for expanded frames, or
* {@link Opcodes#F_FULL}, {@link Opcodes#F_APPEND}, {@link Opcodes#F_CHOP}, {@link
* Opcodes#F_SAME} or {@link Opcodes#F_APPEND}, {@link Opcodes#F_SAME1} for compressed frames.
* @param numLocal number of local variables of this stack map frame.
* @param numLocal number of local variables of this stack map frame. Long and double values count
* for one variable.
* @param local the types of the local variables of this stack map frame. Elements of this list
* can be Integer, String or LabelNode objects (for primitive, reference and uninitialized
* types respectively - see {@link MethodVisitor}).
* @param numStack number of operand stack elements of this stack map frame.
* types respectively - see {@link MethodVisitor}). Long and double values are represented by
* a single element.
* @param numStack number of operand stack elements of this stack map frame. Long and double
* values count for one stack element.
* @param stack the types of the operand stack elements of this stack map frame. Elements of this
* list can be Integer, String or LabelNode objects (for primitive, reference and
* uninitialized types respectively - see {@link MethodVisitor}).
* uninitialized types respectively - see {@link MethodVisitor}). Long and double values are
* represented by a single element.
*/
public FrameNode(
final int type,
......
......@@ -31,16 +31,16 @@ import java.util.Map;
import org.objectweb.asm.MethodVisitor;
/**
* A node that represents a type instruction. A type instruction is an instruction that takes a type
* descriptor as parameter.
* A node that represents a type instruction. A type instruction is an instruction which takes an
* internal name as parameter.
*
* @author Eric Bruneton
*/
public class TypeInsnNode extends AbstractInsnNode {
/**
* The operand of this instruction. This operand is an internal name (see {@link
* org.objectweb.asm.Type}).
* The operand of this instruction. Despite its name (due to historical reasons), this operand is
* an internal name (see {@link org.objectweb.asm.Type}).
*/
public String desc;
......@@ -49,12 +49,12 @@ public class TypeInsnNode extends AbstractInsnNode {
*
* @param opcode the opcode of the type instruction to be constructed. This opcode must be NEW,
* ANEWARRAY, CHECKCAST or INSTANCEOF.
* @param descriptor the operand of the instruction to be constructed. This operand is an internal
* name (see {@link org.objectweb.asm.Type}).
* @param type the operand of the instruction to be constructed. This operand is an internal name
* (see {@link org.objectweb.asm.Type}).
*/
public TypeInsnNode(final int opcode, final String descriptor) {
public TypeInsnNode(final int opcode, final String type) {
super(opcode);
this.desc = descriptor;
this.desc = type;
}
/**
......
......@@ -275,7 +275,8 @@ public abstract class MethodVisitor {
* @param type the type of this stack map frame. Must be {@link Opcodes#F_NEW} for expanded
* frames, or {@link Opcodes#F_FULL}, {@link Opcodes#F_APPEND}, {@link Opcodes#F_CHOP}, {@link
* Opcodes#F_SAME} or {@link Opcodes#F_APPEND}, {@link Opcodes#F_SAME1} for compressed frames.
* @param numLocal the number of local variables in the visited frame.
* @param numLocal the number of local variables in the visited frame. Long and double values
* count for one variable.
* @param local the local variable types in this frame. This array must not be modified. Primitive
* types are represented by {@link Opcodes#TOP}, {@link Opcodes#INTEGER}, {@link
* Opcodes#FLOAT}, {@link Opcodes#LONG}, {@link Opcodes#DOUBLE}, {@link Opcodes#NULL} or
......@@ -283,7 +284,8 @@ public abstract class MethodVisitor {
* Reference types are represented by String objects (representing internal names), and
* uninitialized types by Label objects (this label designates the NEW instruction that
* created this uninitialized value).
* @param numStack the number of operand stack elements in the visited frame.
* @param numStack the number of operand stack elements in the visited frame. Long and double
* values count for one stack element.
* @param stack the operand stack types in this frame. This array must not be modified. Its
* content has the same format as the "local" array.
* @throws IllegalStateException if a frame is visited just after another one, without any
......
Supports Markdown
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