public class Code extends Attribute
ListIterator
class. Note that the size and index
information of the code block will change as opcodes are added.
Code blocks are usually obtained from a BCMethod
, but can also
be constructed via the default constructor. Blocks created this way can
be used to provide template instructions to the various search/replace
methods in this class.
The code class contains methods named after most JVM instructions, each
of which adds the matching opcode to the code block at the
current iterator position. It also contains generic versions of various
JVM instructions whose opcodes are not set until their properties are set
with additional information. Almost all instruction types are able to
'morph' their opcode on the fly as the arguments to the instruction change.
Thus the developer can initially call, for example, the aload
opcode, but later change the type to load to int
and the
opcode will automatically morph to the iload
opcode.
Constructor and Description |
---|
Code()
The public constructor is for creating template code modules
that produce
Instruction s used in matching through
the various search and replace methods. |
Modifier and Type | Method and Description |
---|---|
ArrayLoadInstruction |
aaload()
Load an object array value onto the stack; the
aaload
opcode. |
ArrayStoreInstruction |
aastore()
Store an object value from the stack into an array; the
aastore opcode. |
void |
acceptVisit(BCVisitor visit)
Accept a visit from a
BCVisitor , calling the appropriate methods
to notify the visitor that it has entered this entity, and
to provide it with the proper callbacks for each sub-entity owned
by this one. |
Instruction |
add(Instruction ins)
Adds a copy of the given instruction.
|
ExceptionHandler |
addExceptionHandler()
Add an exception handler to this code block.
|
ExceptionHandler |
addExceptionHandler(ExceptionHandler handler)
Import the given exception handler from another code block.
|
ExceptionHandler |
addExceptionHandler(Instruction tryStart,
Instruction tryEnd,
Instruction handlerStart,
BCClass catchType)
Add an exception handler to this code block.
|
ExceptionHandler |
addExceptionHandler(Instruction tryStart,
Instruction tryEnd,
Instruction handlerStart,
Class catchType)
Add an exception handler to this code block.
|
ExceptionHandler |
addExceptionHandler(Instruction tryStart,
Instruction tryEnd,
Instruction handlerStart,
String catchType)
Add an exception handler to this code block.
|
void |
after(Instruction ins)
Position the iterator just after the given instruction.
|
void |
after(int index)
Place the iterator after the given list index.
|
void |
afterLast()
Set the position of the instruction iterator to after the last opcode.
|
LoadInstruction |
aload()
Load an object local variable onto the stack.
|
ClassInstruction |
anew()
Create a new instance of an object; the
new opcode. |
ClassInstruction |
anewarray()
Create a new instance of an object array; the
anew opcode. |
ReturnInstruction |
areturn()
Return an object from a method; the
areturn opcode. |
Instruction |
arraylength()
Get the length of an array on the stack; the
arraylength
opcode. |
StoreInstruction |
astore()
Store an object value from the stack into a local variable.
|
Instruction |
athrow()
Throw an exception; the
athrow opcode. |
ArrayLoadInstruction |
baload()
Load a byte array value onto the stack; the
baload opcode. |
ArrayStoreInstruction |
bastore()
Store a byte value from the stack into an array; the
bastore opcode. |
void |
before(Instruction ins)
Position the iterator just before the given instruction.
|
void |
before(int index)
Place the iterator before the given list index.
|
void |
beforeFirst()
Reset the position of the instruction iterator to the first opcode.
|
void |
calculateMaxLocals()
Calculate and set the number of locals needed based on
the instructions used and the parameters of the method this code
block is a part of.
|
void |
calculateMaxStack()
Calculate and set the maximum stack depth needed for
the instructions used.
|
ArrayLoadInstruction |
caload()
Load a char array value onto the stack; the
caload opcode. |
ArrayStoreInstruction |
castore()
Store a char value from the stack into an array; the
castore opcode. |
ClassInstruction |
checkcast()
Cast an object on the stack to another type; the
checkcast
opcode. |
ClassConstantInstruction |
classconstant()
Load a class constant onto the stack.
|
void |
clearExceptionHandlers()
Clear all exception handlers.
|
ConstantInstruction |
constant()
Load some constant onto the stack.
|
ConvertInstruction |
convert()
Convert the top stack value to another type.
|
MathInstruction |
dadd()
Add the top two stack double values; the
dadd opcode. |
ArrayLoadInstruction |
daload()
Load a double array value onto the stack; the
daload opcode. |
ArrayStoreInstruction |
dastore()
Store a double value from the stack into an array; the
dastore opcode. |
CmpInstruction |
dcmpg()
Compare the top two stack values; the
dcmpg opcode. |
CmpInstruction |
dcmpl()
Compare the top two stack values; the
dcmpl opcode. |
MathInstruction |
ddiv()
Divide the top two stack double values; the
ddiv opcode. |
LoadInstruction |
dload()
Load a double local variable onto the stack.
|
MathInstruction |
dmul()
Multiply the top two stack double values; the
dmul opcode. |
MathInstruction |
dneg()
Negate the top stack double value; the
dneg opcode. |
MathInstruction |
drem()
Take the remainder of the top two double stack values; the
drem opcode. |
ReturnInstruction |
dreturn()
Return a double from a method; the
dreturn opcode. |
StoreInstruction |
dstore()
Store a double value from the stack into a local variable.
|
MathInstruction |
dsub()
Subtract the top two stack double values; the
dsub opcode. |
StackInstruction |
dup()
The
dup opcode. |
StackInstruction |
dup2()
The
dup2 opcode. |
StackInstruction |
dup2x1()
The
dup2x1 opcode. |
StackInstruction |
dup2x2()
The
dup2x2 opcode. |
StackInstruction |
dupx1()
The
dupx1 opcode. |
StackInstruction |
dupx2()
The
dupx2 opcode. |
MathInstruction |
fadd()
Add the top two stack float values; the
fadd opcode. |
ArrayLoadInstruction |
faload()
Load a float array value onto the stack; the
faload opcode. |
ArrayStoreInstruction |
fastore()
Store a float value from the stack into an array; the
fastore opcode. |
CmpInstruction |
fcmpg()
Compare the top two stack values; the
fcmpg opcode. |
CmpInstruction |
fcmpl()
Compare the top two stack values; the
fcmpl opcode. |
MathInstruction |
fdiv()
Divide the top two stack float values; the
fdiv opcode. |
LoadInstruction |
fload()
Load a float local variable onto the stack.
|
MathInstruction |
fmul()
Multiply the top two stack float values; the
fmul opcode. |
MathInstruction |
fneg()
Negate the top stack float value; the
fneg opcode. |
MathInstruction |
frem()
Take the remainder of the top two float stack values; the
frem opcode. |
ReturnInstruction |
freturn()
Return a float from a method; the
freturn opcode. |
StoreInstruction |
fstore()
Store a float value from the stack into a local variable.
|
MathInstruction |
fsub()
Subtract the top two stack float values; the
fsub opcode. |
ExceptionHandler |
getExceptionHandler(BCClass catchType)
Return the exception handler that catches the given exception type;
if multiple handlers catch the given type, which is returned is
undefined.
|
ExceptionHandler |
getExceptionHandler(Class catchType)
Return the exception handler that catches the given exception type;
if multiple handlers catch the given type, which is returned is
undefined.
|
ExceptionHandler |
getExceptionHandler(String catchType)
Return the exception handler that catches the given exception type;
if multiple handlers catch the given type, which is returned is
undefined.
|
ExceptionHandler[] |
getExceptionHandlers()
Return the exception handlers active in this code block, or an
empty array if none.
|
ExceptionHandler[] |
getExceptionHandlers(BCClass catchType)
Return all exception handlers that catch the given exception type,
or an empty array if none.
|
ExceptionHandler[] |
getExceptionHandlers(Class catchType)
Return all exception handlers that catch the given exception type,
or an empty array if none.
|
ExceptionHandler[] |
getExceptionHandlers(String catchType)
Return all exception handlers that catch the given exception type,
or an empty array if none.
|
GetFieldInstruction |
getfield()
Load the value from a field onto the stack; the
getfield
opcode. |
Instruction[] |
getInstructions()
Return all the Instructions of this method.
|
LineNumberTable |
getLineNumberTable(boolean add)
Return line number information for the code.
|
int |
getLocalsIndex(int paramIndex)
Return the local variable index for the paramIndex'th parameter to
the method.
|
LocalVariableTable |
getLocalVariableTable(boolean add)
Return local variable information for the code.
|
LocalVariableTypeTable |
getLocalVariableTypeTable(boolean add)
Return local variable generics information for the code.
|
int |
getMaxLocals()
Return the maximum number of local variables (including params)
set for this method.
|
int |
getMaxStack()
Return the maximum stack depth set for this code block.
|
BCMethod |
getMethod()
The owning method.
|
int |
getNextLocalsIndex()
Return the next available local variable index.
|
int |
getParamsIndex(int localIndex)
Return the parameter index for the given local index, or -1 if
the given local does not reference a param.
|
GetFieldInstruction |
getstatic()
Load the value from a static field onto the stack; the
getstatic opcode. |
JumpInstruction |
go2()
The
go2 opcode. |
boolean |
hasNext()
Return true if a subsequent call to
next() will return an
instruction. |
boolean |
hasPrevious()
Return true if a subsequent call to
previous() will return an
instruction. |
MathInstruction |
iadd()
Add the top two stack int values; the
iadd opcode. |
ArrayLoadInstruction |
iaload()
Load an int array value onto the stack; the
iaload opcode. |
MathInstruction |
iand()
Take the mathematical and of the top two stack int values; the
iand opcode. |
ArrayStoreInstruction |
iastore()
Store an int value from the stack into an array; the
iastore opcode. |
MathInstruction |
idiv()
Divide the top two stack int values; the
idiv opcode. |
IfInstruction |
ifacmpeq()
The
ifacmpeq opcode. |
IfInstruction |
ifacmpne()
The
ifacmpne opcode. |
IfInstruction |
ifeq()
The
ifeq opcode. |
IfInstruction |
ifge()
The
ifge opcode. |
IfInstruction |
ifgt()
The
ifgt opcode. |
IfInstruction |
ificmpeq()
The
ificmpeq opcode. |
IfInstruction |
ificmpge()
The
ificmpge opcode. |
IfInstruction |
ificmpgt()
The
ificmpgt opcode. |
IfInstruction |
ificmple()
The
ificmple opcode. |
IfInstruction |
ificmplt()
The
ificmplt opcode. |
IfInstruction |
ificmpne()
The
ificmpne opcode. |
IfInstruction |
ifle()
The
ifle opcode. |
IfInstruction |
iflt()
The
iflt opcode. |
IfInstruction |
ifne()
The
ifne opcode. |
IfInstruction |
ifnonnull()
The
ifnonnull opcode. |
IfInstruction |
ifnull()
The
ifnull opcode. |
IIncInstruction |
iinc()
Add the
iinc opcode. |
LoadInstruction |
iload()
Load an int local variable onto the stack.
|
MathInstruction |
imul()
Multiply the top two stack int values; the
imul opcode. |
MathInstruction |
ineg()
Negate the top stack int value; the
ineg opcode. |
MethodInstruction |
invokedynamic()
Invoke a dynamic method; the
invokedynamic opcode. |
MethodInstruction |
invokeinterface()
Invoke a method on an interface; the
invokeinterface opcode. |
MethodInstruction |
invokespecial()
Invoke a method non-virtually, as for constructors and superclass
methods; the
invokespecial opcode. |
MethodInstruction |
invokestatic()
Invoke a static method; the
invokestatic opcode. |
MethodInstruction |
invokevirtual()
Invoke a virtual method; the
invokevirtual opcode. |
MathInstruction |
ior()
Take the mathematical or of the top two stack int values; the
ior opcode. |
MathInstruction |
irem()
Take the remainder of the top two int stack values; the
irem opcode. |
ReturnInstruction |
ireturn()
Return an int from a method; the
ireturn opcode. |
MathInstruction |
ishl()
Shift the top stack int values; the
ishl opcode. |
MathInstruction |
ishr()
Shift the top stack int values; the
ishr opcode. |
ClassInstruction |
isinstance()
Test if a stack object is an instance of a class; the
instanceof opcode. |
StoreInstruction |
istore()
Store an int value from the stack into a local variable.
|
MathInstruction |
isub()
Subtract the top two stack int values; the
isub opcode. |
MathInstruction |
iushr()
Shift the top stack int values; the
iushr opcode. |
MathInstruction |
ixor()
Take the mathematical xor of the top two stack int values; the
ixor opcode. |
JumpInstruction |
jsr()
The
jsr opcode used in implementing finally
clauses. |
MathInstruction |
ladd()
Add the top two stack long values; the
ladd opcode. |
ArrayLoadInstruction |
laload()
Load a long array value onto the stack; the
laload opcode. |
MathInstruction |
land()
Take the mathematical and of the top two stack long values; the
land opcode. |
ArrayStoreInstruction |
lastore()
Store a long value from the stack into an array; the
lastore opcode. |
CmpInstruction |
lcmp()
Compare the top two stack values; the
lcmp opcode. |
MathInstruction |
ldiv()
Divide the top two stack long values; the
ldiv opcode. |
ListIterator |
listIterator()
Returns another listIterator view of the Instructions in this
code block.
|
LoadInstruction |
lload()
Load a long local variable onto the stack.
|
MathInstruction |
lmul()
Multiply the top two stack long values; the
lmul opcode. |
MathInstruction |
lneg()
Negate the top stack long value; the
lneg opcode. |
LookupSwitchInstruction |
lookupswitch()
The
lookupswitch opcode. |
MathInstruction |
lor()
Take the mathematical or of the top two stack long values; the
lor opcode. |
MathInstruction |
lrem()
Take the remainder of the top two long stack values; the
lrem opcode. |
ReturnInstruction |
lreturn()
Return a long from a method; the
lreturn opcode. |
MathInstruction |
lshl()
Shift the top stack long values; the
lshl opcode. |
MathInstruction |
lshr()
Shift the top stack long values; the
lshr opcode. |
StoreInstruction |
lstore()
Store a long value from the stack into a local variable.
|
MathInstruction |
lsub()
Subtract the top two stack long values; the
lsub opcode. |
MathInstruction |
lushr()
Shift the top stack long values; the
lushr opcode. |
MathInstruction |
lxor()
Take the mathematical xor of the top two stack long values; the
lxor opcode. |
MathInstruction |
math()
Perform some math operation on the stack items.
|
MonitorEnterInstruction |
monitorenter()
The
monitorenter opcode. |
MonitorExitInstruction |
monitorexit()
The
monitorexit opcode. |
MultiANewArrayInstruction |
multianewarray()
Create a new multidimensional array; the
multianewarray
opcode. |
NewArrayInstruction |
newarray()
Create a new array of a primitive type; the
newarray opcode. |
Instruction |
next()
Return the next instruction.
|
int |
nextIndex()
Return the index of the next instruction, or
size() if at end. |
Instruction |
nop()
Add the
nop opcode. |
StackInstruction |
pop()
The
pop opcode. |
StackInstruction |
pop2()
The
pop2 opcode. |
Instruction |
previous()
Return the previous instruction.
|
int |
previousIndex()
Return the index of the previous instruction, or -1 if at beginning.
|
PutFieldInstruction |
putfield()
Place the value of a field onto the stack; the
putfield
opcode. |
PutFieldInstruction |
putstatic()
Place the value of a static field onto the stack; the
putstatic opcode. |
void |
remove()
Remove the last iterated instruction.
|
boolean |
removeExceptionHandler(BCClass catchType)
Remove the exception handler that catches the given type.
|
boolean |
removeExceptionHandler(Class catchType)
Remove the exception handler that catches the given type.
|
boolean |
removeExceptionHandler(ExceptionHandler handler)
Remove an exception handler from this code block.
|
boolean |
removeExceptionHandler(String catchType)
Remove the exception handler that catches the given type.
|
boolean |
removeLineNumberTable()
Remove the line number table for the code.
|
boolean |
removeLocalVariableTables()
Remove the local variable table for the code.
|
boolean |
removeLocalVariableTypeTables()
Remove the local variable type table for the code.
|
int |
replace(Instruction[] templates,
Instruction[] with)
Equivalent to looping over each given template/replacement
pair and calling
replace(Instruction,Instruction) for each. |
int |
replace(Instruction template,
Instruction with)
Replaces all the instructions in this code block that match the
given template with the given instruction.
|
RetInstruction |
ret()
Add the
ret opcode, used in implementing
finally clauses. |
ArrayLoadInstruction |
saload()
Load a short array value onto the stack; the
saload opcode. |
ArrayStoreInstruction |
sastore()
Store a short value from the stack into an array; the
sastore opcode. |
boolean |
searchBackward(Instruction template)
Find the closest previous instruction from the current iterator
position that matches the given one, according to the
Object.equals(java.lang.Object) methods of the instruction types. |
boolean |
searchForward(Instruction template)
Find the next instruction from the current iterator position that
matches the given one, according to the
Object.equals(java.lang.Object) methods of
the instruction types. |
Instruction |
set(Instruction ins)
Replaces the last iterated instruction with a copy of the given one.
|
void |
setExceptionHandlers(ExceptionHandler[] handlers)
Set the exception handlers for this code block.
|
void |
setMaxLocals(int max)
Set the maximum number of local variables (including params) in
this method.
|
void |
setMaxStack(int max)
Set the maximum stack depth for this code block.
|
int |
size()
Return the number of instructions in the method.
|
StackInstruction |
swap()
The
swap opcode. |
TableSwitchInstruction |
tableswitch()
The
tableswitch opcode. |
ReturnInstruction |
vreturn()
Return void from a method; the
return opcode. |
WideInstruction |
wide()
Add the
wide opcode. |
MathInstruction |
xadd()
Add the top two stack values.
|
ArrayLoadInstruction |
xaload()
Load an array value onto the stack.
|
MathInstruction |
xand()
Take the mathematical and of the top two stack values.
|
ArrayStoreInstruction |
xastore()
Store a value from the stack into an array.
|
CmpInstruction |
xcmp()
Compare the top two stack values.
|
MathInstruction |
xdiv()
Divide the top two stack values.
|
LoadInstruction |
xload()
Load a local variable onto the stack.
|
MathInstruction |
xmul()
Multiply the top two stack values.
|
MathInstruction |
xneg()
Negate the top stack value.
|
MathInstruction |
xor()
Take the mathematical or of the top two stack values.
|
MathInstruction |
xrem()
Take the remainder of the top two stack values.
|
ReturnInstruction |
xreturn()
Return from a method.
|
MathInstruction |
xshl()
Shift the top stack values.
|
MathInstruction |
xshr()
Shift the top stack values.
|
StoreInstruction |
xstore()
Store a value from the stack into a local variable.
|
MathInstruction |
xsub()
Subtract the top two stack values.
|
MathInstruction |
xushr()
Shift the top stack values.
|
MathInstruction |
xxor()
Take the mathematical xor of the top two stack values.
|
getClassLoader, getName, getNameIndex, getOwner, getPool, getProject, isValid
addAttribute, addAttribute, clearAttributes, getAttribute, getAttributes, getAttributes, removeAttribute, removeAttribute, setAttributes
public Code()
Instruction
s used in matching through
the various search
and replace
methods.public BCMethod getMethod()
public int getMaxStack()
public void setMaxStack(int max)
public int getMaxLocals()
public void setMaxLocals(int max)
public int getLocalsIndex(int paramIndex)
public int getParamsIndex(int localIndex)
getLocalsIndex(int)
public int getNextLocalsIndex()
public void calculateMaxLocals()
setMaxLocals(int)
public void calculateMaxStack()
setMaxStack(int)
public ExceptionHandler[] getExceptionHandlers()
public ExceptionHandler getExceptionHandler(String catchType)
public ExceptionHandler getExceptionHandler(Class catchType)
public ExceptionHandler getExceptionHandler(BCClass catchType)
public ExceptionHandler[] getExceptionHandlers(String catchType)
public ExceptionHandler[] getExceptionHandlers(Class catchType)
public ExceptionHandler[] getExceptionHandlers(BCClass catchType)
public void setExceptionHandlers(ExceptionHandler[] handlers)
public ExceptionHandler addExceptionHandler(ExceptionHandler handler)
public ExceptionHandler addExceptionHandler()
public ExceptionHandler addExceptionHandler(Instruction tryStart, Instruction tryEnd, Instruction handlerStart, String catchType)
tryStart
- the first instruction of the try {} blocktryEnd
- the last instruction of the try {} blockhandlerStart
- the first instruction of the catch {} blockcatchType
- the type of exception being caughtpublic ExceptionHandler addExceptionHandler(Instruction tryStart, Instruction tryEnd, Instruction handlerStart, Class catchType)
tryStart
- the first instruction of the try {} blocktryEnd
- the last instruction of the try {} blockhandlerStart
- the first instruction of the catch {} blockcatchType
- the type of exception being caughtpublic ExceptionHandler addExceptionHandler(Instruction tryStart, Instruction tryEnd, Instruction handlerStart, BCClass catchType)
tryStart
- the first instruction of the try {} blocktryEnd
- the last instruction of the try {} blockhandlerStart
- the first instruction of the catch {} blockcatchType
- the type of exception being caughtpublic void clearExceptionHandlers()
public boolean removeExceptionHandler(String catchType)
public boolean removeExceptionHandler(Class catchType)
public boolean removeExceptionHandler(BCClass catchType)
public boolean removeExceptionHandler(ExceptionHandler handler)
public int size()
public void beforeFirst()
public void afterLast()
public void before(Instruction ins)
public void after(Instruction ins)
public boolean hasNext()
next()
will return an
instruction.public boolean hasPrevious()
previous()
will return an
instruction.public Instruction next()
public int nextIndex()
size()
if at end.public Instruction previous()
public int previousIndex()
public void before(int index)
public void after(int index)
public boolean searchForward(Instruction template)
Object.equals(java.lang.Object)
methods of
the instruction types. This allows for matching based on template
instructions, as the equals methods of most instructions return
true if the information for the given instruction has not been filled
in. If a match is found, the iterator is placed after the matching
Instruction. If no match is found, moves the iterator to
afterLast()
.public boolean searchBackward(Instruction template)
Object.equals(java.lang.Object)
methods of the instruction types. This allows
for matching based on template instructions, as the equals methods of
most instructions return true if the information for the given
instruction has not been filled in. If a match is found, the iterator
is placed before the matching Instruction. If no match is found,
moves the iterator to beforeFirst()
.public Instruction add(Instruction ins)
public Instruction set(Instruction ins)
ListIterator.set(E)
public int replace(Instruction template, Instruction with)
afterLast()
.public int replace(Instruction[] templates, Instruction[] with)
replace(Instruction,Instruction)
for each.public void remove()
ListIterator.remove()
public ClassConstantInstruction classconstant()
public Instruction nop()
nop
opcode.public ConstantInstruction constant()
ConstantInstruction
type takes any constant and correctly translates it into the proper
opcode, depending on the constant type and value. For example,
if the constant value is set to 0L, the opcode will be set to
lconst0
.public LoadInstruction xload()
nop
until its type and local index are set.public LoadInstruction iload()
nop
until its local index is set.public LoadInstruction lload()
nop
until its local index is set.public LoadInstruction fload()
nop
until its local index is set.public LoadInstruction dload()
nop
until its local index is set.public LoadInstruction aload()
nop
until its local index is set.public StoreInstruction xstore()
nop
until its type and local index are set.public StoreInstruction istore()
nop
until its local index is
set.public StoreInstruction lstore()
nop
until its local index is
set.public StoreInstruction fstore()
nop
until its local index is
set.public StoreInstruction dstore()
nop
until its local index is
set.public StoreInstruction astore()
nop
until its local index is
set.public RetInstruction ret()
ret
opcode, used in implementing
finally
clauses.public IIncInstruction iinc()
iinc
opcode.public WideInstruction wide()
wide
opcode.public ArrayLoadInstruction xaload()
nop
until its type is set.public ArrayLoadInstruction iaload()
iaload
opcode.public ArrayLoadInstruction laload()
laload
opcode.public ArrayLoadInstruction faload()
faload
opcode.public ArrayLoadInstruction daload()
daload
opcode.public ArrayLoadInstruction aaload()
aaload
opcode.public ArrayLoadInstruction baload()
baload
opcode.public ArrayLoadInstruction caload()
caload
opcode.public ArrayLoadInstruction saload()
saload
opcode.public ArrayStoreInstruction xastore()
nop
until its type is set.public ArrayStoreInstruction iastore()
iastore
opcode.public ArrayStoreInstruction lastore()
lastore
opcode.public ArrayStoreInstruction fastore()
fastore
opcode.public ArrayStoreInstruction dastore()
dastore
opcode.public ArrayStoreInstruction aastore()
aastore
opcode.public ArrayStoreInstruction bastore()
bastore
opcode.public ArrayStoreInstruction castore()
castore
opcode.public ArrayStoreInstruction sastore()
sastore
opcode.public StackInstruction pop()
pop
opcode.public StackInstruction pop2()
pop2
opcode.public StackInstruction dup()
dup
opcode.public StackInstruction dupx1()
dupx1
opcode.public StackInstruction dupx2()
dupx2
opcode.public StackInstruction dup2()
dup2
opcode.public StackInstruction dup2x1()
dup2x1
opcode.public StackInstruction dup2x2()
dup2x2
opcode.public StackInstruction swap()
swap
opcode.public MathInstruction math()
nop
until its operation and type are set.public MathInstruction xadd()
nop
until its type is set.public MathInstruction iadd()
iadd
opcode.public MathInstruction ladd()
ladd
opcode.public MathInstruction fadd()
fadd
opcode.public MathInstruction dadd()
dadd
opcode.public MathInstruction xsub()
nop
until its type is set.public MathInstruction isub()
isub
opcode.public MathInstruction lsub()
lsub
opcode.public MathInstruction fsub()
fsub
opcode.public MathInstruction dsub()
dsub
opcode.public MathInstruction xmul()
nop
until its type is set.public MathInstruction imul()
imul
opcode.public MathInstruction lmul()
lmul
opcode.public MathInstruction fmul()
fmul
opcode.public MathInstruction dmul()
dmul
opcode.public MathInstruction xdiv()
nop
until its type is set.public MathInstruction idiv()
idiv
opcode.public MathInstruction ldiv()
ldiv
opcode.public MathInstruction fdiv()
fdiv
opcode.public MathInstruction ddiv()
ddiv
opcode.public MathInstruction xrem()
nop
until its type is set.public MathInstruction irem()
irem
opcode.public MathInstruction lrem()
lrem
opcode.public MathInstruction frem()
frem
opcode.public MathInstruction drem()
drem
opcode.public MathInstruction xneg()
nop
until its type is set.public MathInstruction ineg()
ineg
opcode.public MathInstruction lneg()
lneg
opcode.public MathInstruction fneg()
fneg
opcode.public MathInstruction dneg()
dneg
opcode.public MathInstruction xshl()
nop
until its type is set.public MathInstruction ishl()
ishl
opcode.public MathInstruction lshl()
lshl
opcode.public MathInstruction xshr()
nop
until its type is set.public MathInstruction ishr()
ishr
opcode.public MathInstruction lshr()
lshr
opcode.public MathInstruction xushr()
nop
until its type is set.public MathInstruction iushr()
iushr
opcode.public MathInstruction lushr()
lushr
opcode.public MathInstruction xand()
nop
until its type is set.public MathInstruction iand()
iand
opcode.public MathInstruction land()
land
opcode.public MathInstruction xor()
nop
until its type is set.public MathInstruction ior()
ior
opcode.public MathInstruction lor()
lor
opcode.public MathInstruction xxor()
nop
until its type is set.public MathInstruction ixor()
ixor
opcode.public MathInstruction lxor()
lxor
opcode.public ConvertInstruction convert()
nop
until the types to convert
between are set.public CmpInstruction xcmp()
nop
until its type is set.public CmpInstruction lcmp()
lcmp
opcode.public CmpInstruction fcmpl()
fcmpl
opcode.public CmpInstruction fcmpg()
fcmpg
opcode.public CmpInstruction dcmpl()
dcmpl
opcode.public CmpInstruction dcmpg()
dcmpg
opcode.public IfInstruction ifeq()
ifeq
opcode.public IfInstruction ifne()
ifne
opcode.public IfInstruction iflt()
iflt
opcode.public IfInstruction ifge()
ifge
opcode.public IfInstruction ifgt()
ifgt
opcode.public IfInstruction ifle()
ifle
opcode.public IfInstruction ificmpeq()
ificmpeq
opcode.public IfInstruction ificmpne()
ificmpne
opcode.public IfInstruction ificmplt()
ificmplt
opcode.public IfInstruction ificmpge()
ificmpge
opcode.public IfInstruction ificmpgt()
ificmpgt
opcode.public IfInstruction ificmple()
ificmple
opcode.public IfInstruction ifacmpeq()
ifacmpeq
opcode.public IfInstruction ifacmpne()
ifacmpne
opcode.public IfInstruction ifnull()
ifnull
opcode.public IfInstruction ifnonnull()
ifnonnull
opcode.public JumpInstruction go2()
go2
opcode.public JumpInstruction jsr()
jsr
opcode used in implementing finally
clauses.public TableSwitchInstruction tableswitch()
tableswitch
opcode.public LookupSwitchInstruction lookupswitch()
lookupswitch
opcode.public ReturnInstruction xreturn()
nop
until its type is set.public ReturnInstruction vreturn()
return
opcode.public ReturnInstruction ireturn()
ireturn
opcode.public ReturnInstruction lreturn()
lreturn
opcode.public ReturnInstruction freturn()
freturn
opcode.public ReturnInstruction dreturn()
dreturn
opcode.public ReturnInstruction areturn()
areturn
opcode.public GetFieldInstruction getfield()
getfield
opcode.public GetFieldInstruction getstatic()
getstatic
opcode.public PutFieldInstruction putfield()
putfield
opcode.public PutFieldInstruction putstatic()
putstatic
opcode.public MethodInstruction invokevirtual()
invokevirtual
opcode.public MethodInstruction invokespecial()
invokespecial
opcode.public MethodInstruction invokeinterface()
invokeinterface
opcode.public MethodInstruction invokestatic()
invokestatic
opcode.public MethodInstruction invokedynamic()
invokedynamic
opcode.public ClassInstruction anew()
new
opcode.public ClassInstruction anewarray()
anew
opcode.public ClassInstruction checkcast()
checkcast
opcode.public ClassInstruction isinstance()
instanceof
opcode.public MultiANewArrayInstruction multianewarray()
multianewarray
opcode.public NewArrayInstruction newarray()
newarray
opcode.public Instruction arraylength()
arraylength
opcode.public Instruction athrow()
athrow
opcode.public MonitorEnterInstruction monitorenter()
monitorenter
opcode.public MonitorExitInstruction monitorexit()
monitorexit
opcode.public Instruction[] getInstructions()
public void acceptVisit(BCVisitor visit)
VisitAcceptor
BCVisitor
, calling the appropriate methods
to notify the visitor that it has entered this entity, and
to provide it with the proper callbacks for each sub-entity owned
by this one.public LineNumberTable getLineNumberTable(boolean add)
Attributes
interface.add
- if true, a new line number table will be added
if not already presentadd
param is set to falsepublic boolean removeLineNumberTable()
Attributes
interface.public LocalVariableTable getLocalVariableTable(boolean add)
Attributes
interface.add
- if true, a new local variable table will be
added if not already presentadd
param is set to falsepublic boolean removeLocalVariableTables()
Attributes
interface.public LocalVariableTypeTable getLocalVariableTypeTable(boolean add)
Attributes
interface.add
- if true, a new local variable type table will be
added if not already presentadd
param is set to falsepublic boolean removeLocalVariableTypeTables()
Attributes
interface.public ListIterator listIterator()
Copyright © 2002–2019. All rights reserved.