类 AbstractInsnNode
java.lang.Object
cn.taketoday.bytecode.tree.AbstractInsnNode
- 直接已知子类:
FieldInsnNode,FrameNode,IincInsnNode,InsnNode,IntInsnNode,InvokeDynamicInsnNode,JumpInsnNode,LabelNode,LdcInsnNode,LineNumberNode,LookupSwitchInsnNode,MethodInsnNode,MultiANewArrayInsnNode,TableSwitchInsnNode,TypeInsnNode,VarInsnNode
A node that represents a bytecode instruction. An instruction can appear at most once in at
most one
InsnList at a time.- 作者:
- Eric Bruneton
-
字段概要
字段修饰符和类型字段说明static final intThe type ofFieldInsnNodeinstructions.static final intThe type ofFrameNode"instructions".static final intThe type ofIincInsnNodeinstructions.(专用程序包) intThe index of this instruction in the list to which it belongs.static final intThe type ofInsnNodeinstructions.static final intThe type ofIntInsnNodeinstructions.The runtime invisible type annotations of this instruction.static final intThe type ofInvokeDynamicInsnNodeinstructions.static final intThe type ofJumpInsnNodeinstructions.static final intThe type ofLabelNode"instructions".static final intThe type ofLdcInsnNodeinstructions.static final intThe type ofLineNumberNode"instructions".static final intThe type ofLookupSwitchInsnNodeinstructions.static final intThe type ofMethodInsnNodeinstructions.static final intThe type ofMultiANewArrayInsnNodeinstructions.(专用程序包) AbstractInsnNodeThe next instruction in the list to which this instruction belongs.protected intThe opcode of this instruction.(专用程序包) AbstractInsnNodeThe previous instruction in the list to which this instruction belongs.static final intThe type ofTableSwitchInsnNodeinstructions.static final intThe type ofTypeInsnNodeinstructions.static final intThe type ofVarInsnNodeinstructions.The runtime visible type annotations of this instruction. -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明abstract voidaccept(MethodVisitor methodVisitor) Makes the given method visitor visit this instruction.protected final voidacceptAnnotations(MethodVisitor methodVisitor) Makes the given visitor visit the annotations of this instruction.(专用程序包) static LabelNodeReturns the clone of the given label.(专用程序包) static LabelNode[]Returns the clones of the given labels.abstract AbstractInsnNodeReturns a copy of this instruction.protected final AbstractInsnNodecloneAnnotations(AbstractInsnNode insnNode) Clones the annotations of the given instruction into this instruction.getNext()Returns the next instruction in the list to which this instruction belongs, if any.intReturns the opcode of this instruction.Returns the previous instruction in the list to which this instruction belongs, if any.abstract intgetType()Returns the type of this instruction.
-
字段详细资料
-
INSN
public static final int INSNThe type ofInsnNodeinstructions.- 另请参阅:
-
INT_INSN
public static final int INT_INSNThe type ofIntInsnNodeinstructions.- 另请参阅:
-
VAR_INSN
public static final int VAR_INSNThe type ofVarInsnNodeinstructions.- 另请参阅:
-
TYPE_INSN
public static final int TYPE_INSNThe type ofTypeInsnNodeinstructions.- 另请参阅:
-
FIELD_INSN
public static final int FIELD_INSNThe type ofFieldInsnNodeinstructions.- 另请参阅:
-
METHOD_INSN
public static final int METHOD_INSNThe type ofMethodInsnNodeinstructions.- 另请参阅:
-
INVOKE_DYNAMIC_INSN
public static final int INVOKE_DYNAMIC_INSNThe type ofInvokeDynamicInsnNodeinstructions.- 另请参阅:
-
JUMP_INSN
public static final int JUMP_INSNThe type ofJumpInsnNodeinstructions.- 另请参阅:
-
LABEL
public static final int LABELThe type ofLabelNode"instructions".- 另请参阅:
-
LDC_INSN
public static final int LDC_INSNThe type ofLdcInsnNodeinstructions.- 另请参阅:
-
IINC_INSN
public static final int IINC_INSNThe type ofIincInsnNodeinstructions.- 另请参阅:
-
TABLESWITCH_INSN
public static final int TABLESWITCH_INSNThe type ofTableSwitchInsnNodeinstructions.- 另请参阅:
-
LOOKUPSWITCH_INSN
public static final int LOOKUPSWITCH_INSNThe type ofLookupSwitchInsnNodeinstructions.- 另请参阅:
-
MULTIANEWARRAY_INSN
public static final int MULTIANEWARRAY_INSNThe type ofMultiANewArrayInsnNodeinstructions.- 另请参阅:
-
FRAME
public static final int FRAMEThe type ofFrameNode"instructions".- 另请参阅:
-
LINE
public static final int LINEThe type ofLineNumberNode"instructions".- 另请参阅:
-
opcode
protected int opcodeThe opcode of this instruction. -
visibleTypeAnnotations
The runtime visible type annotations of this instruction. This field is only used for real instructions (i.e. not for labels, frames, or line number nodes). This list is a list ofTypeAnnotationNodeobjects. May be null. -
invisibleTypeAnnotations
The runtime invisible type annotations of this instruction. This field is only used for real instructions (i.e. not for labels, frames, or line number nodes). This list is a list ofTypeAnnotationNodeobjects. May be null. -
previousInsn
AbstractInsnNode previousInsnThe previous instruction in the list to which this instruction belongs. -
nextInsn
AbstractInsnNode nextInsnThe next instruction in the list to which this instruction belongs. -
index
int indexThe index of this instruction in the list to which it belongs. The value of this field is correct only whenInsnList.cacheis not null. A value of -1 indicates that this instruction does not belong to anyInsnList.
-
-
构造器详细资料
-
AbstractInsnNode
protected AbstractInsnNode(int opcode) Constructs a newAbstractInsnNode.- 参数:
opcode- the opcode of the instruction to be constructed.
-
-
方法详细资料
-
getOpcode
public int getOpcode()Returns the opcode of this instruction.- 返回:
- the opcode of this instruction.
-
getType
public abstract int getType()Returns the type of this instruction.- 返回:
- the type of this instruction, i.e. one the constants defined in this class.
-
getPrevious
Returns the previous instruction in the list to which this instruction belongs, if any.- 返回:
- the previous instruction in the list to which this instruction belongs, if any. May be null.
-
getNext
Returns the next instruction in the list to which this instruction belongs, if any.- 返回:
- the next instruction in the list to which this instruction belongs, if any. May be null.
-
accept
Makes the given method visitor visit this instruction.- 参数:
methodVisitor- a method visitor.
-
acceptAnnotations
Makes the given visitor visit the annotations of this instruction.- 参数:
methodVisitor- a method visitor.
-
clone
Returns a copy of this instruction.- 参数:
clonedLabels- a map from LabelNodes to cloned LabelNodes.- 返回:
- a copy of this instruction. The returned instruction does not belong to any
InsnList.
-
clone
Returns the clone of the given label.- 参数:
label- a label.clonedLabels- a map from LabelNodes to cloned LabelNodes.- 返回:
- the clone of the given label.
-
clone
Returns the clones of the given labels.- 参数:
labels- a list of labels.clonedLabels- a map from LabelNodes to cloned LabelNodes.- 返回:
- the clones of the given labels.
-
cloneAnnotations
Clones the annotations of the given instruction into this instruction.- 参数:
insnNode- the source instruction.- 返回:
- this instruction.
-