Package com.strobel.assembler.ir
Enum Class OpCode
- All Implemented Interfaces:
Serializable,Comparable<OpCode>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final FlowControlprivate final OpCodeTypeprivate final OperandTypeprivate final StackBehaviorprivate final StackBehaviorprivate static final byte[]static final intThe byte prefix for the wide instructions.private static final OpCode[]static final intprivate static final OpCode[] -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateOpCode(int code, FlowControl flowControl, OpCodeType opCodeType, OperandType operandType, StackBehavior stackBehaviorPop, StackBehavior stackBehaviorPush) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanThrow()booleanstatic OpCodeget(int code) Get the OpCode for a simple standard 1-byte opcode.intgetCode()private static OpCode[]getOpcodeBlock(int prefix) intgetSize()intbooleanbooleanbooleanbooleanisBranch()booleanisGoto()booleanisInvoke()booleanbooleanisLeave()booleanisLoad()booleanbooleanisReturn()booleanbooleanisStore()booleanisThrow()booleanbooleanisWide()negate()static OpCodeReturns the enum constant of this class with the specified name.static OpCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NOP
-
ACONST_NULL
-
ICONST_M1
-
ICONST_0
-
ICONST_1
-
ICONST_2
-
ICONST_3
-
ICONST_4
-
ICONST_5
-
LCONST_0
-
LCONST_1
-
FCONST_0
-
FCONST_1
-
FCONST_2
-
DCONST_0
-
DCONST_1
-
BIPUSH
-
SIPUSH
-
LDC
-
LDC_W
-
LDC2_W
-
ILOAD
-
LLOAD
-
FLOAD
-
DLOAD
-
ALOAD
-
ILOAD_0
-
ILOAD_1
-
ILOAD_2
-
ILOAD_3
-
LLOAD_0
-
LLOAD_1
-
LLOAD_2
-
LLOAD_3
-
FLOAD_0
-
FLOAD_1
-
FLOAD_2
-
FLOAD_3
-
DLOAD_0
-
DLOAD_1
-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R
-
RET
-
TABLESWITCH
-
LOOKUPSWITCH
-
IRETURN
-
LRETURN
-
FRETURN
-
DRETURN
-
ARETURN
-
RETURN
-
GETSTATIC
-
PUTSTATIC
-
GETFIELD
-
PUTFIELD
-
INVOKEVIRTUAL
-
INVOKESPECIAL
-
INVOKESTATIC
-
INVOKEINTERFACE
-
INVOKEDYNAMIC
-
NEW
-
NEWARRAY
-
ANEWARRAY
-
ARRAYLENGTH
-
ATHROW
-
CHECKCAST
-
INSTANCEOF
-
MONITORENTER
-
MONITOREXIT
-
MULTIANEWARRAY
-
IFNULL
-
IFNONNULL
-
GOTO_W
-
JSR_W
-
BREAKPOINT
-
ILOAD_W
-
LLOAD_W
-
FLOAD_W
-
DLOAD_W
-
ALOAD_W
-
ISTORE_W
-
LSTORE_W
-
FSTORE_W
-
DSTORE_W
-
ASTORE_W
-
IINC_W
-
RET_W
-
LEAVE
-
ENDFINALLY
-
-
Field Details
-
_code
private final int _code -
_flowControl
-
_opCodeType
-
_operandType
-
_stackBehaviorPop
-
_stackBehaviorPush
-
STANDARD
public static final int STANDARDThe byte prefix for the wide instructions.- See Also:
-
WIDE
public static final int WIDE- See Also:
-
standardOpCodes
-
wideOpCodes
-
stackChange
private static final byte[] stackChange
-
-
Constructor Details
-
OpCode
private OpCode(int code, FlowControl flowControl, OpCodeType opCodeType, OperandType operandType, StackBehavior stackBehaviorPop, StackBehavior stackBehaviorPush)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getCode
public int getCode() -
isWide
public boolean isWide() -
getOperandType
-
getFlowControl
-
getOpCodeType
-
getStackBehaviorPop
-
getStackBehaviorPush
-
hasVariableStackBehavior
public boolean hasVariableStackBehavior() -
isReturn
public boolean isReturn() -
isThrow
public boolean isThrow() -
isInvoke
public boolean isInvoke() -
isJumpToSubroutine
public boolean isJumpToSubroutine() -
isReturnFromSubroutine
public boolean isReturnFromSubroutine() -
isLeave
public boolean isLeave() -
isBranch
public boolean isBranch() -
isGoto
public boolean isGoto() -
isUnconditionalBranch
public boolean isUnconditionalBranch() -
isMoveInstruction
public boolean isMoveInstruction() -
isLoad
public boolean isLoad() -
isStore
public boolean isStore() -
isArrayLoad
public boolean isArrayLoad() -
isArrayStore
public boolean isArrayStore() -
getSize
public int getSize() -
getStackChange
public int getStackChange() -
endsUnconditionalJumpBlock
public boolean endsUnconditionalJumpBlock() -
canThrow
public boolean canThrow() -
negate
-
get
Get the OpCode for a simple standard 1-byte opcode. -
getOpcodeBlock
-