public enum Opcode extends Enum<Opcode> implements OpcodeInformation
Modifier and Type | Class and Description |
---|---|
static class |
Opcode.Category |
Modifier and Type | Method and Description |
---|---|
static List<Opcode> |
allOfCategory(Opcode.Category category) |
static SortedSet<Opcode> |
arithmeticAndLogic()
These instructions pop numeric values from the operand stack combine them
and push the result on the stack.
|
static SortedSet<Opcode> |
arrays() |
int |
asInt() |
static SortedSet<Opcode> |
casts()
These instructions pop a value from the stack, convert it to another
type, and push the result back.
|
Opcode.Category |
category() |
static SortedSet<Opcode> |
constants()
These instructions push a constant value on the operand stack:
ACONST_NULL pushes null , ICONST_0 pushes the
int value 0 , FCONST_0 pushes 0f ,
DCONST_0 pushes 0d , BIPUSH b pushes the
byte value b , SIPUSH s pushes the short
value s , LDC cst pushes the arbitrary int ,
float , long , double , String , or class1
constant cst, etc. |
String |
description() |
static SortedSet<Opcode> |
fields() |
static Opcode |
forInt(int opcodeInt) |
static SortedSet<Opcode> |
jumps() |
static SortedSet<Opcode> |
localVariables() |
static SortedSet<Opcode> |
methods() |
static SortedSet<Opcode> |
nop() |
static SortedSet<Opcode> |
objects() |
static SortedSet<Opcode> |
returns() |
static SortedSet<Opcode> |
stack()
These instructions are used to manipulate values on the stack:
POP pops the value on top of the stack, DUP pushes a copy
of the top stack value, SWAP pops two values and pushes them in
the reverse order, etc. |
UnknownTypeValue |
stackValue() |
static Opcode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Opcode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Opcode NOP
public static final Opcode ACONST_NULL
public static final Opcode ICONST_M1
public static final Opcode ICONST_0
public static final Opcode ICONST_1
public static final Opcode ICONST_2
public static final Opcode ICONST_3
public static final Opcode ICONST_4
public static final Opcode ICONST_5
public static final Opcode LCONST_0
public static final Opcode LCONST_1
public static final Opcode FCONST_0
public static final Opcode FCONST_1
public static final Opcode FCONST_2
public static final Opcode DCONST_0
public static final Opcode DCONST_1
public static final Opcode BIPUSH
public static final Opcode SIPUSH
public static final Opcode LDC
public static final Opcode LDC_W
public static final Opcode LDC2_W
public static final Opcode ILOAD
public static final Opcode LLOAD
public static final Opcode FLOAD
public static final Opcode DLOAD
public static final Opcode ALOAD
public static final Opcode ILOAD_0
public static final Opcode ILOAD_1
public static final Opcode ILOAD_2
public static final Opcode ILOAD_3
public static final Opcode LLOAD_0
public static final Opcode LLOAD_1
public static final Opcode LLOAD_2
public static final Opcode LLOAD_3
public static final Opcode FLOAD_0
public static final Opcode FLOAD_1
public static final Opcode FLOAD_2
public static final Opcode FLOAD_3
public static final Opcode DLOAD_0
public static final Opcode DLOAD_1
public static final Opcode DLOAD_2
public static final Opcode DLOAD_3
public static final Opcode ALOAD_0
public static final Opcode ALOAD_1
public static final Opcode ALOAD_2
public static final Opcode ALOAD_3
public static final Opcode IALOAD
public static final Opcode LALOAD
public static final Opcode FALOAD
public static final Opcode DALOAD
public static final Opcode AALOAD
public static final Opcode BALOAD
public static final Opcode CALOAD
public static final Opcode SALOAD
public static final Opcode ISTORE
public static final Opcode LSTORE
public static final Opcode FSTORE
public static final Opcode DSTORE
public static final Opcode ASTORE
public static final Opcode ISTORE_0
public static final Opcode ISTORE_1
public static final Opcode ISTORE_2
public static final Opcode ISTORE_3
public static final Opcode LSTORE_0
public static final Opcode LSTORE_1
public static final Opcode LSTORE_2
public static final Opcode LSTORE_3
public static final Opcode FSTORE_0
public static final Opcode FSTORE_1
public static final Opcode FSTORE_2
public static final Opcode FSTORE_3
public static final Opcode DSTORE_0
public static final Opcode DSTORE_1
public static final Opcode DSTORE_2
public static final Opcode DSTORE_3
public static final Opcode ASTORE_0
public static final Opcode ASTORE_1
public static final Opcode ASTORE_2
public static final Opcode ASTORE_3
public static final Opcode IASTORE
public static final Opcode LASTORE
public static final Opcode FASTORE
public static final Opcode DASTORE
public static final Opcode AASTORE
public static final Opcode BASTORE
public static final Opcode CASTORE
public static final Opcode SASTORE
public static final Opcode POP
public static final Opcode POP2
public static final Opcode DUP
public static final Opcode DUP_X1
public static final Opcode DUP_X2
public static final Opcode DUP2
public static final Opcode DUP2_X1
public static final Opcode DUP2_X2
public static final Opcode SWAP
public static final Opcode IADD
public static final Opcode LADD
public static final Opcode FADD
public static final Opcode DADD
public static final Opcode ISUB
public static final Opcode LSUB
public static final Opcode FSUB
public static final Opcode DSUB
public static final Opcode IMUL
public static final Opcode LMUL
public static final Opcode FMUL
public static final Opcode DMUL
public static final Opcode IDIV
public static final Opcode LDIV
public static final Opcode FDIV
public static final Opcode DDIV
public static final Opcode IREM
public static final Opcode LREM
public static final Opcode FREM
public static final Opcode DREM
public static final Opcode INEG
public static final Opcode LNEG
public static final Opcode FNEG
public static final Opcode DNEG
public static final Opcode ISHL
public static final Opcode LSHL
public static final Opcode ISHR
public static final Opcode LSHR
public static final Opcode IUSHR
public static final Opcode LUSHR
public static final Opcode IAND
public static final Opcode LAND
public static final Opcode IOR
public static final Opcode LOR
public static final Opcode IXOR
public static final Opcode LXOR
public static final Opcode IINC
public static final Opcode I2L
public static final Opcode I2F
public static final Opcode I2D
public static final Opcode L2I
public static final Opcode L2F
public static final Opcode L2D
public static final Opcode F2I
public static final Opcode F2L
public static final Opcode F2D
public static final Opcode D2I
public static final Opcode D2L
public static final Opcode D2F
public static final Opcode I2B
public static final Opcode I2C
public static final Opcode I2S
public static final Opcode LCMP
public static final Opcode FCMPL
public static final Opcode FCMPG
public static final Opcode DCMPL
public static final Opcode DCMPG
public static final Opcode IFEQ
public static final Opcode IFNE
public static final Opcode IFLT
public static final Opcode IFGE
public static final Opcode IFGT
public static final Opcode IFLE
public static final Opcode IF_ICMPEQ
public static final Opcode IF_ICMPNE
public static final Opcode IF_ICMPLT
public static final Opcode IF_ICMPGE
public static final Opcode IF_ICMPGT
public static final Opcode IF_ICMPLE
public static final Opcode IF_ACMPEQ
public static final Opcode IF_ACMPNE
public static final Opcode GOTO
public static final Opcode JSR
public static final Opcode RET
public static final Opcode TABLESWITCH
public static final Opcode LOOKUPSWITCH
public static final Opcode IRETURN
public static final Opcode LRETURN
public static final Opcode FRETURN
public static final Opcode DRETURN
public static final Opcode ARETURN
public static final Opcode RETURN
public static final Opcode GETSTATIC
public static final Opcode PUTSTATIC
public static final Opcode GETFIELD
public static final Opcode PUTFIELD
public static final Opcode INVOKEVIRTUAL
public static final Opcode INVOKESPECIAL
public static final Opcode INVOKESTATIC
public static final Opcode INVOKEINTERFACE
public static final Opcode INVOKEDYNAMIC
public static final Opcode NEW
public static final Opcode NEWARRAY
public static final Opcode ANEWARRAY
public static final Opcode ARRAYLENGTH
public static final Opcode ATHROW
public static final Opcode CHECKCAST
public static final Opcode INSTANCEOF
public static final Opcode MONITORENTER
public static final Opcode MONITOREXIT
public static final Opcode WIDE
public static final Opcode MULTIANEWARRAY
public static final Opcode IFNULL
public static final Opcode IFNONNULL
public static final Opcode GOTO_W
public static final Opcode JSR_W
public static Opcode[] values()
for (Opcode c : Opcode.values()) System.out.println(c);
public static Opcode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int asInt()
asInt
in interface OpcodeInformation
public Opcode.Category category()
category
in interface OpcodeInformation
public UnknownTypeValue stackValue()
stackValue
in interface OpcodeInformation
public String description()
description
in interface OpcodeInformation
public static Opcode forInt(int opcodeInt)
public static List<Opcode> allOfCategory(Opcode.Category category)
public static SortedSet<Opcode> stack()
POP
pops the value on top of the stack, DUP
pushes a copy
of the top stack value, SWAP
pops two values and pushes them in
the reverse order, etc.public static SortedSet<Opcode> constants()
ACONST_NULL
pushes null
, ICONST_0
pushes the
int
value 0
, FCONST_0
pushes 0f
,
DCONST_0
pushes 0d
, BIPUSH b
pushes the
byte
value b
, SIPUSH s
pushes the short
value s
, LDC cst
pushes the arbitrary int
,
float
, long
, double
, String
, or class1
constant cst, etc.public static SortedSet<Opcode> arithmeticAndLogic()
xADD
, xSUB
, xMUL
, xDIV
and xREM
correspond to the +, -, *, /
and %
operations, where
x
is either I, L, F
or D
. Similarly there are
other instructions corresponding to <<
, >>
, >>>
,
|
, &
and ^
, for int
and long
values.public static SortedSet<Opcode> casts()
I2F
, F2D
, L2D
, etc. convert numeric values
from one numeric type to another. CHECKCAST
t converts a
reference value to the type t.Copyright © 2008–2020 Graham Allan. All rights reserved.