Package org.aspectj.apache.bcel.generic
Klasse BranchHandle
java.lang.Object
org.aspectj.apache.bcel.generic.InstructionHandle
org.aspectj.apache.bcel.generic.BranchHandle
- Alle implementierten Schnittstellen:
Serializable
BranchHandle is returned by specialized InstructionList.append() whenever a BranchInstruction is appended. This is useful when
the target of this instruction is not known at time of creation and must be set later via setTarget().
- Version:
- $Id: BranchHandle.java,v 1.5 2009/10/05 17:35:36 aclement Exp $
- Autor:
- M. Dahm
- Siehe auch:
-
Feldübersicht
Von Klasse geerbte Felder org.aspectj.apache.bcel.generic.InstructionHandle
pos
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungint
void
Set new contents.void
Pass new target to instruction.protected int
updatePosition
(int offset, int max_offset) Called by InstructionList.setPositions when setting the position for every instruction.void
updateTarget
(InstructionHandle old_ih, InstructionHandle new_ih) Update target of instruction.Von Klasse geerbte Methoden org.aspectj.apache.bcel.generic.InstructionHandle
addTargeter, getInstruction, getNext, getPrev, getTargeters, getTargetersCopy, hasTargeters, removeAllTargeters, removeTargeter, toString, toString
-
Methodendetails
-
getPosition
public int getPosition()- Setzt außer Kraft:
getPosition
in KlasseInstructionHandle
- Gibt zurück:
- the position, i.e., the byte code offset of the contained instruction. This is accurate only after InstructionList.setPositions() has been called.
-
updatePosition
protected int updatePosition(int offset, int max_offset) Called by InstructionList.setPositions when setting the position for every instruction. In the presence of variable length instructions 'setPositions()' performs multiple passes over the instruction list to calculate the correct (byte) positions and offsets by calling this function.- Parameter:
offset
- additional offset caused by preceding (variable length) instructionsmax_offset
- the maximum offset that may be caused by these instructions- Gibt zurück:
- additional offset caused by possible change of this instruction's length
-
setTarget
Pass new target to instruction. -
updateTarget
Update target of instruction. -
getTarget
- Gibt zurück:
- target of instruction.
-
setInstruction
Set new contents. Old instruction is disposed and may not be used anymore.- Setzt außer Kraft:
setInstruction
in KlasseInstructionHandle
-