Package org.apache.bcel.generic
Interface InstructionConstants
-
- All Known Implementing Classes:
InstructionFactory
,PUSH
public interface InstructionConstants
This interface contains shareable instruction objects. In order to save memory you can use some instructions multiply, since they have an immutable state and are directly derived from Instruction. I.e. they have no instance fields that could be changed. Since some of these instructions like ICONST_0 occur very frequently this can save a lot of time and space. This feature is an adaptation of the FlyWeight design pattern, we just use an array instead of a factory. The Instructions can also accessed directly under their names, so it's possible to write il.append(Instruction.ICONST_0);- Version:
- $Id: InstructionConstants.java 386056 2006-03-15 11:31:56Z tcurdt $
- Author:
- M. Dahm
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
InstructionConstants.Clinit
-
Field Summary
-
-
-
Field Detail
-
NOP
static final Instruction NOP
Predefined instruction objects
-
ACONST_NULL
static final Instruction ACONST_NULL
-
ICONST_M1
static final Instruction ICONST_M1
-
ICONST_0
static final Instruction ICONST_0
-
ICONST_1
static final Instruction ICONST_1
-
ICONST_2
static final Instruction ICONST_2
-
ICONST_3
static final Instruction ICONST_3
-
ICONST_4
static final Instruction ICONST_4
-
ICONST_5
static final Instruction ICONST_5
-
LCONST_0
static final Instruction LCONST_0
-
LCONST_1
static final Instruction LCONST_1
-
FCONST_0
static final Instruction FCONST_0
-
FCONST_1
static final Instruction FCONST_1
-
FCONST_2
static final Instruction FCONST_2
-
DCONST_0
static final Instruction DCONST_0
-
DCONST_1
static final Instruction DCONST_1
-
IALOAD
static final ArrayInstruction IALOAD
-
LALOAD
static final ArrayInstruction LALOAD
-
FALOAD
static final ArrayInstruction FALOAD
-
DALOAD
static final ArrayInstruction DALOAD
-
AALOAD
static final ArrayInstruction AALOAD
-
BALOAD
static final ArrayInstruction BALOAD
-
CALOAD
static final ArrayInstruction CALOAD
-
SALOAD
static final ArrayInstruction SALOAD
-
IASTORE
static final ArrayInstruction IASTORE
-
LASTORE
static final ArrayInstruction LASTORE
-
FASTORE
static final ArrayInstruction FASTORE
-
DASTORE
static final ArrayInstruction DASTORE
-
AASTORE
static final ArrayInstruction AASTORE
-
BASTORE
static final ArrayInstruction BASTORE
-
CASTORE
static final ArrayInstruction CASTORE
-
SASTORE
static final ArrayInstruction SASTORE
-
POP
static final StackInstruction POP
-
POP2
static final StackInstruction POP2
-
DUP
static final StackInstruction DUP
-
DUP_X1
static final StackInstruction DUP_X1
-
DUP_X2
static final StackInstruction DUP_X2
-
DUP2
static final StackInstruction DUP2
-
DUP2_X1
static final StackInstruction DUP2_X1
-
DUP2_X2
static final StackInstruction DUP2_X2
-
SWAP
static final StackInstruction SWAP
-
IADD
static final ArithmeticInstruction IADD
-
LADD
static final ArithmeticInstruction LADD
-
FADD
static final ArithmeticInstruction FADD
-
DADD
static final ArithmeticInstruction DADD
-
ISUB
static final ArithmeticInstruction ISUB
-
LSUB
static final ArithmeticInstruction LSUB
-
FSUB
static final ArithmeticInstruction FSUB
-
DSUB
static final ArithmeticInstruction DSUB
-
IMUL
static final ArithmeticInstruction IMUL
-
LMUL
static final ArithmeticInstruction LMUL
-
FMUL
static final ArithmeticInstruction FMUL
-
DMUL
static final ArithmeticInstruction DMUL
-
IDIV
static final ArithmeticInstruction IDIV
-
LDIV
static final ArithmeticInstruction LDIV
-
FDIV
static final ArithmeticInstruction FDIV
-
DDIV
static final ArithmeticInstruction DDIV
-
IREM
static final ArithmeticInstruction IREM
-
LREM
static final ArithmeticInstruction LREM
-
FREM
static final ArithmeticInstruction FREM
-
DREM
static final ArithmeticInstruction DREM
-
INEG
static final ArithmeticInstruction INEG
-
LNEG
static final ArithmeticInstruction LNEG
-
FNEG
static final ArithmeticInstruction FNEG
-
DNEG
static final ArithmeticInstruction DNEG
-
ISHL
static final ArithmeticInstruction ISHL
-
LSHL
static final ArithmeticInstruction LSHL
-
ISHR
static final ArithmeticInstruction ISHR
-
LSHR
static final ArithmeticInstruction LSHR
-
IUSHR
static final ArithmeticInstruction IUSHR
-
LUSHR
static final ArithmeticInstruction LUSHR
-
IAND
static final ArithmeticInstruction IAND
-
LAND
static final ArithmeticInstruction LAND
-
IOR
static final ArithmeticInstruction IOR
-
LOR
static final ArithmeticInstruction LOR
-
IXOR
static final ArithmeticInstruction IXOR
-
LXOR
static final ArithmeticInstruction LXOR
-
I2L
static final ConversionInstruction I2L
-
I2F
static final ConversionInstruction I2F
-
I2D
static final ConversionInstruction I2D
-
L2I
static final ConversionInstruction L2I
-
L2F
static final ConversionInstruction L2F
-
L2D
static final ConversionInstruction L2D
-
F2I
static final ConversionInstruction F2I
-
F2L
static final ConversionInstruction F2L
-
F2D
static final ConversionInstruction F2D
-
D2I
static final ConversionInstruction D2I
-
D2L
static final ConversionInstruction D2L
-
D2F
static final ConversionInstruction D2F
-
I2B
static final ConversionInstruction I2B
-
I2C
static final ConversionInstruction I2C
-
I2S
static final ConversionInstruction I2S
-
LCMP
static final Instruction LCMP
-
FCMPL
static final Instruction FCMPL
-
FCMPG
static final Instruction FCMPG
-
DCMPL
static final Instruction DCMPL
-
DCMPG
static final Instruction DCMPG
-
IRETURN
static final ReturnInstruction IRETURN
-
LRETURN
static final ReturnInstruction LRETURN
-
FRETURN
static final ReturnInstruction FRETURN
-
DRETURN
static final ReturnInstruction DRETURN
-
ARETURN
static final ReturnInstruction ARETURN
-
RETURN
static final ReturnInstruction RETURN
-
ARRAYLENGTH
static final Instruction ARRAYLENGTH
-
ATHROW
static final Instruction ATHROW
-
MONITORENTER
static final Instruction MONITORENTER
-
MONITOREXIT
static final Instruction MONITOREXIT
-
THIS
static final LocalVariableInstruction THIS
You can use these constants in multiple places safely, if you can guarantee that you will never alter their internal values, e.g. call setIndex().
-
ALOAD_0
static final LocalVariableInstruction ALOAD_0
-
ALOAD_1
static final LocalVariableInstruction ALOAD_1
-
ALOAD_2
static final LocalVariableInstruction ALOAD_2
-
ILOAD_0
static final LocalVariableInstruction ILOAD_0
-
ILOAD_1
static final LocalVariableInstruction ILOAD_1
-
ILOAD_2
static final LocalVariableInstruction ILOAD_2
-
ASTORE_0
static final LocalVariableInstruction ASTORE_0
-
ASTORE_1
static final LocalVariableInstruction ASTORE_1
-
ASTORE_2
static final LocalVariableInstruction ASTORE_2
-
ISTORE_0
static final LocalVariableInstruction ISTORE_0
-
ISTORE_1
static final LocalVariableInstruction ISTORE_1
-
ISTORE_2
static final LocalVariableInstruction ISTORE_2
-
INSTRUCTIONS
static final Instruction[] INSTRUCTIONS
Get object via its opcode, for immutable instructions like branch instructions entries are set to null.
-
bla
static final InstructionConstants.Clinit bla
Interfaces may have no static initializers, so we simulate this with an inner class.
-
-