Package org.apache.bcel.generic


package org.apache.bcel.generic
Generic part of the Apache Byte Code Engineering Library (BCEL), classes to dynamically modify class objects and byte code instructions.
  • Class
    Description
    AALOAD - Load reference from array
    AASTORE - Store into reference array
    ACONST_NULL - Push null reference
    Denote family of instructions that allocates space in the heap.
    ALOAD - Load reference from local variable
    ANEWARRAY - Create new array of references
     
     
    ARETURN - Return reference from method
    Super class for the family of arithmetic instructions.
     
    Super class for instructions dealing with array access such as IALOAD.
    ARRAYLENGTH - Get length of array
    Denotes array type, such as int[][]
    ASTORE - Store reference into local variable
    ATHROW - Throw exception
    BALOAD - Load byte or boolean from array
    Denotes basic type such as int.
    BASTORE - Store into byte or boolean array
    BIPUSH - Push byte on stack
    BranchHandle is returned by specialized InstructionList.append() whenever a BranchInstruction is appended.
    Abstract super class for branching instructions like GOTO, IFEQ, etc..
    BREAKPOINT, JVM dependent, ignored by default
    CALOAD - Load char from array
    CASTORE - Store into char array
    CHECKCAST - Check whether object is of given type
     
    Template class for building up a java class.
    Thrown on internal exceptions.
    Implement this interface if you're interested in changes to a ClassGen object and register yourself with addObserver().
    This class represents an exception handler, i.e., specifies the region where a handler is active and an instruction where the actual handling is done.
    Wrapper class for 'compound' operations, virtual instructions that don't exist as byte code, but give a useful meaning.
    This class is used to build up a constant pool.
    Denotes a push instruction that produces a literal on the stack such as SIPUSH, BIPUSH, ICONST, etc.
    Super class for the x2y family of instructions.
    Abstract super class for instructions that use an index into the constant pool such as LDC, INVOKEVIRTUAL, etc.
    D2F - Convert double to float
    D2I - Convert double to int
    D2L - Convert double to long
    DADD - Add doubles
    DALOAD - Load double from array
    DASTORE - Store into double array
    DCMPG - Compare doubles: value1 > value2
    DCMPL - Compare doubles: value1 < value2
    DCONST - Push 0.0 or 1.0, other values cause an exception
    DDIV - Divide doubles
    DLOAD - Load double from local variable
    DMUL - Multiply doubles
    DNEG - Negate double
    DREM - Remainder of doubles
    DRETURN - Return double from method
    DSTORE - Store double into local variable
    DSUB - Substract doubles
    DUP - Duplicate top operand stack word
    DUP_X1 - Duplicate top operand stack word and put two down
    DUP_X2 - Duplicate top operand stack word and put three down
    DUP2 - Duplicate two top operand stack words
    DUP2_X1 - Duplicate two top operand stack words and put three down
    DUP2_X2 - Duplicate two top operand stack words and put four down
     
     
    Supplies empty method bodies to be overridden by subclasses.
     
    Denote an instruction that may throw a run-time or a linking exception (or both) during execution.
    F2D - Convert float to double
    F2I - Convert float to int
    F2L - Convert float to long
    FADD - Add floats
    FALOAD - Load float from array
    FASTORE - Store into float array
    FCMPG - Compare floats: value1 > value2
    FCMPL - Compare floats: value1 < value2
    FCONST - Push 0.0, 1.0 or 2.0, other values cause an exception
    FDIV - Divide floats
    Template class for building up a field.
    Super class for FieldGen and MethodGen objects, since they have some methods in common!
    Super class for the GET/PUTxxx family of instructions.
    Imnplement this interface if you're interested in changes to a FieldGen object and register yourself with addObserver().
    Super class for InvokeInstruction and FieldInstruction, since they have some methods in common!
    FLOAD - Load float from local variable
    FMUL - Multiply floats
    FNEG - Negate float
    FREM - Remainder of floats
    FRETURN - Return float from method
    FSTORE - Store float into local variable
    FSUB - Substract floats
    GETFIELD - Fetch field from object
    GETSTATIC - Fetch static field from class
    GOTO - Branch always (to relative offset, not absolute address)
    GOTO_W - Branch always (to relative offset, not absolute address)
    Super class for GOTO
    I2B - Convert int to byte
    I2C - Convert int to char
    I2D - Convert int to double
    I2F - Convert int to float
    I2L - Convert int to long
    I2S - Convert int to short
    IADD - Add ints
    IALOAD - Load int from array
    IAND - Bitwise AND int
    IASTORE - Store into int array
    ICONST - Push value between -1, ..., 5, other values cause an exception
    IDIV - Divide ints
    IF_ACMPEQ - Branch if reference comparison succeeds
    IF_ACMPNE - Branch if reference comparison doesn't succeed
    IF_ICMPEQ - Branch if int comparison succeeds
    IF_ICMPGE - Branch if int comparison succeeds
    IF_ICMPGT - Branch if int comparison succeeds
    IF_ICMPLE - Branch if int comparison succeeds
    IF_ICMPLT - Branch if int comparison succeeds
    IF_ICMPNE - Branch if int comparison doesn't succeed
    IFEQ - Branch if int comparison with zero succeeds
    IFGE - Branch if int comparison with zero succeeds
    IFGT - Branch if int comparison with zero succeeds
    Super class for the IFxxx family of instructions.
    IFLE - Branch if int comparison with zero succeeds
    IFLT - Branch if int comparison with zero succeeds
    IFNE - Branch if int comparison with zero succeeds
    IFNONNULL - Branch if reference is not null
    IFNULL - Branch if reference is not null
    IINC - Increment local variable by constant
    ILOAD - Load int from local variable onto stack
    IMPDEP1 - Implementation dependent
    IMPDEP2 - Implementation dependent
    IMUL - Multiply ints
    Denote entity that refers to an index, e.g.
    INEG - Negate int
    INSTANCEOF - Determine if object is of given type
    Abstract super class for all Java byte codes.
    Equality of instructions isn't clearly to be defined.
    Contains shareable instruction objects.
    Deprecated.
    (since 6.0) Do not use.
    Deprecated, consider private and ignore.
    Instances of this class may be used, e.g., to generate typed versions of instructions.
    Instances of this class give users a handle to the instructions contained in an InstructionList.
    This class is a container for a list of Instruction objects.
    Implement this interface if you're interested in changes to an InstructionList object and register yourself with addObserver().
    Denote that a class targets InstructionHandles within an InstructionList.
    Class for INVOKEDYNAMIC.
    Super class for the INVOKExxx family of instructions.
    INVOKEINTERFACE - Invoke interface method
    INVOKESPECIAL - Invoke instance method; special handling for superclass, private and instance initialization method invocations
    INVOKESTATIC - Invoke a class (static) method
    INVOKEVIRTUAL - Invoke instance method; dispatch based on class
    IOR - Bitwise OR int
    IREM - Remainder of int
    IRETURN - Return int from method
    ISHL - Arithmetic shift left int
    ISHR - Arithmetic shift right int
    ISTORE - Store int from stack into local variable
    ISUB - Substract ints
    IUSHR - Logical shift right int
    IXOR - Bitwise XOR int
    JSR - Jump to subroutine
    JSR_W - Jump to subroutine
    Super class for JSR - Jump to subroutine
    L2D - Convert long to double
    L2F - Convert long to float
    L2I - Convert long to int
    LADD - Add longs
    LALOAD - Load long from array
    LAND - Bitwise AND longs
    LASTORE - Store into long array
    LCMP - Compare longs:
    LCONST - Push 0 or 1, other values cause an exception
    LDC - Push item from constant pool.
    LDC_W - Push item from constant pool (wide index)
    LDC2_W - Push long or double from constant pool
    LDIV - Divide longs
    This class represents a line number within a method, i.e., give an instruction a line number corresponding to the source code line.
    LLOAD - Load long from local variable
    LMUL - Multiply longs
    LNEG - Negate long
    Denotes that an instruction may start the process of loading and resolving the referenced class in the Virtual Machine.
    Denotes an unparameterized instruction to load a value from a local variable, e.g.
    Represents a local variable within a method.
    Abstract super class for instructions dealing with local variables.
    LOOKUPSWITCH - Switch with unordered set of values
    LOR - Bitwise OR long
    LREM - Remainder of long
    LRETURN - Return long from method
    LSHL - Arithmetic shift left long
    LSHR - Arithmetic shift right long
    LSTORE - Store long into local variable
    LSUB - Substract longs
    LUSHR - Logical shift right long
    LXOR - Bitwise XOR long
    Template class for building up a method.
    Implement this interface if you're interested in changes to a MethodGen object and register yourself with addObserver().
    MONITORENTER - Enter monitor for object
    MONITOREXIT - Exit monitor for object
    MULTIANEWARRAY - Create new mutidimensional array of references
    Denote entity that has both name and type.
    Super class for FieldOrMethod and INVOKEDYNAMIC, since they both have names and signatures
    NEW - Create new object
    NEWARRAY - Create new array of basic type (int, short, ...)
    NOP - Do nothing
    Denotes reference such as String.
    POP - Pop top operand stack word
    POP2 - Pop two top operand stack words
    Denotes an unparameterized instruction to pop a value on top from the stack, such as ISTORE, POP, PUTSTATIC.
    Wrapper class for push operations, which are implemented either as BIPUSH, LDC or xCONST_n instructions.
    Denotes an unparameterized instruction to produce a value on top of the stack, such as ILOAD, LDC, SIPUSH, DUP, ICONST, etc.
    PUTFIELD - Put field in object
    PUTSTATIC - Put static field in class
    Super class for object and array types.
    RET - Return from subroutine
    RETURN - Return from void method
    Returnaddress, the type JSR or JSR_W instructions push upon the stack.
    Super class for the xRETURN family of instructions.
    SALOAD - Load short from array
    SASTORE - Store into short array
    Select - Abstract super class for LOOKUPSWITCH and TABLESWITCH instructions.
     
    SIPUSH - Push short
    Denote an instruction that may consume a value from the stack.
    Super class for stack operations like DUP and POP.
    Denotes an instruction that may produce a value on top of the stack (this excludes DUP_X1, e.g.)
    Denotes an unparameterized instruction to store a value into a local variable, e.g.
    SWAP - Swa top operand stack word
    SWITCH - Branch depending on int value, generates either LOOKUPSWITCH or TABLESWITCH instruction, depending on whether the match values (int[]) can be sorted with no gaps between the numbers.
    TABLESWITCH - Switch within given range of values, i.e., low..high
    Thrown by InstructionList.remove() when one or multiple disposed instructions are still being referenced by an InstructionTargeter object.
    Abstract super class for all possible Java types, namely basic types such as int, object types like String and array types, e.g.
    Gets the type associated with an instruction, int for ILOAD, or the type of the field of a PUTFIELD instruction, e.g..
    Denotes an instruction to perform an unconditional branch, i.e., GOTO, JSR.
    Denotes an instruction to be a variable length instruction, such as GOTO, JSR, LOOKUPSWITCH and TABLESWITCH.
    Interface implementing the Visitor pattern programming style.