|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.aspectj.apache.bcel.generic.Instruction org.aspectj.apache.bcel.generic.InstructionBranch org.aspectj.apache.bcel.generic.InstructionSelect
public abstract class InstructionSelect
Select - Abstract super class for LOOKUPSWITCH and TABLESWITCH instructions.
LOOKUPSWITCH
,
TABLESWITCH
,
InstructionList
,
Serialized FormField Summary | |
---|---|
protected int |
fixedLength
|
protected int[] |
indices
|
protected short |
length
|
protected int[] |
match
|
protected int |
matchLength
|
protected int |
padding
|
protected InstructionHandle[] |
targets
|
Fields inherited from class org.aspectj.apache.bcel.generic.InstructionBranch |
---|
positionOfThisInstruction, targetIndex, targetInstruction |
Fields inherited from class org.aspectj.apache.bcel.generic.Instruction |
---|
opcode |
Constructor Summary | |
---|---|
InstructionSelect(short opcode,
ByteSequence bytes)
|
Method Summary | |
---|---|
boolean |
containsTarget(InstructionHandle ih)
|
void |
dump(java.io.DataOutputStream out)
Dump instruction as byte code to stream out. |
boolean |
equals(java.lang.Object other)
Only equal if they are the same branch instruction - otherwise too risky as the targets may only temporarily be pointing at the same destination. |
int[] |
getIndices()
|
int |
getLength()
|
int[] |
getMatchs()
|
protected int |
getTargetOffset(InstructionHandle target)
|
InstructionHandle[] |
getTargets()
|
int |
hashCode()
|
void |
setTarget(int i,
InstructionHandle target)
Set branch target for `i'th case |
java.lang.String |
toString(boolean verbose)
Long output format: |
protected int |
updatePosition(int offset,
int max_offset)
Since this is a variable length instruction, it may shift the following instructions which then need to update their position. |
void |
updateTarget(InstructionHandle old_ih,
InstructionHandle new_ih)
Update the target destination for this instruction. |
Methods inherited from class org.aspectj.apache.bcel.generic.InstructionBranch |
---|
getIndex, getTarget, getTargetOffset, getType, isIfInstruction, physicalSuccessor, setTarget |
Methods inherited from class org.aspectj.apache.bcel.generic.Instruction |
---|
consumeStack, copy, getLoadClassType, getName, getOpcode, getType, getValue, getValue, isALOAD, isArrayCreationInstruction, isASTORE, isConstantInstruction, isConstantPoolInstruction, isIndexedInstruction, isJsrInstruction, isLoadInstruction, isLocalVariableInstruction, isReturnInstruction, isStackConsumer, isStackProducer, isStoreInstruction, produceStack, readInstruction, setIndex, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int[] match
protected int[] indices
protected InstructionHandle[] targets
protected int fixedLength
protected int matchLength
protected int padding
protected short length
Constructor Detail |
---|
public InstructionSelect(short opcode, ByteSequence bytes) throws java.io.IOException
java.io.IOException
Method Detail |
---|
protected int getTargetOffset(InstructionHandle target)
protected int updatePosition(int offset, int max_offset)
updatePosition
in class InstructionBranch
offset
- additional offset caused by preceding (variable length) instructionsmax_offset
- the maximum offset that may be caused by these instructions
public void dump(java.io.DataOutputStream out) throws java.io.IOException
dump
in class InstructionBranch
out
- Output stream
java.io.IOException
public java.lang.String toString(boolean verbose)
InstructionBranch
toString
in class InstructionBranch
verbose
- long/short format switch
public void setTarget(int i, InstructionHandle target)
public void updateTarget(InstructionHandle old_ih, InstructionHandle new_ih)
InstructionBranch
updateTarget
in interface InstructionTargeter
updateTarget
in class InstructionBranch
old_ih
- old targetnew_ih
- new targetpublic boolean containsTarget(InstructionHandle ih)
containsTarget
in interface InstructionTargeter
containsTarget
in class InstructionBranch
public int[] getMatchs()
public int[] getIndices()
public boolean equals(java.lang.Object other)
InstructionBranch
equals
in class InstructionBranch
public int hashCode()
hashCode
in class InstructionBranch
public InstructionHandle[] getTargets()
public int getLength()
getLength
in class Instruction
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |