TargetInsnpublic final class TargetInsn extends FixedSizeInsn Instruction which has a single branch target. |
Fields Summary |
---|
private CodeAddress | targetnon-null; the branch target |
Methods Summary |
---|
protected java.lang.String | argString(){@inheritDoc}
if (target == null) {
return "????";
}
return target.identifierString();
| public CodeAddress | getTarget()Gets the unique branch target of this instruction.
return target;
| public int | getTargetAddress()Gets the target address of this instruction. This is only valid
to call if the target instruction has been assigned an address,
and it is merely a convenient shorthand for
getTarget().getAddress() .
return target.getAddress();
| public int | getTargetOffset()Gets the branch offset of this instruction. This is only valid to
call if both this and the target instruction each has been assigned
an address, and it is merely a convenient shorthand for
getTargetAddress() - getAddress() .
return target.getAddress() - getAddress();
| public boolean | hasTargetOffset()Returns whether the target offset is known.
return hasAddress() && target.hasAddress();
| public com.android.dx.dex.code.TargetInsn | withNewTargetAndReversed(CodeAddress target)Returns an instance that is just like this one, except that its
opcode has the opposite sense (as a test; e.g. a
lt test becomes a ge ), and its branch
target is replaced by the one given, and all set-once values
associated with the class (such as its address) are reset.
Dop opcode = getOpcode().getOppositeTest();
return new TargetInsn(opcode, getPosition(), getRegisters(), target);
| public DalvInsn | withOpcode(Dop opcode){@inheritDoc}
return new TargetInsn(opcode, getPosition(), getRegisters(), target);
| public DalvInsn | withRegisters(com.android.dx.rop.code.RegisterSpecList registers){@inheritDoc}
return new TargetInsn(getOpcode(), getPosition(), registers, target);
|
|