Top Description Fields Constructors Methods
org.droidparts.dexmaker.dx.rop.code

public final Class ThrowingInsn

extends Insn
Class Inheritance
Imports
org.droidparts.dexmaker.dx.rop.type.Type, .TypeList

Instruction which possibly throws. The successors list in the basic block an instance of this class is inside corresponds in-order to the list of exceptions handled by this instruction, with the no-exception case appended as the final target.

Field Summary

Modifier and TypeField and Description
private final TypeList
catches

non-null; list of exceptions caught

Constructor Summary

AccessConstructor and Description
public
ThrowingInsn(Rop
non-null; the opcode
opcode
,
SourcePosition
non-null; source position
position
,
RegisterSpecList
non-null; specs for all the sources
sources
,
TypeList
non-null; list of exceptions caught
catches
)

Constructs an instance.

Method Summary

Modifier and TypeMethod and Description
public void
accept(Insn.Visitor
non-null; the visitor to call on
visitor
)

Implements abstract org.droidparts.dexmaker.dx.rop.code.Insn.accept.

Calls the appropriate method on the given visitor, depending on the class of this instance.
public TypeList
getCatches()

Implements abstract org.droidparts.dexmaker.dx.rop.code.Insn.getCatches.

Gets the list of possibly-caught exceptions.
public String
getInlineString()

Overrides org.droidparts.dexmaker.dx.rop.code.Insn.getInlineString.

Gets an "inline" string portion for toHuman(), if available.
public static String

Returns:

non-null; the string form
toCatchString
(TypeList
non-null; the catches list
catches
)

Gets the string form of a register spec list to be used as a catches list.

public Insn
withAddedCatch(Type
non-null; type to append to the catch list
type
)

Implements abstract org.droidparts.dexmaker.dx.rop.code.Insn.withAddedCatch.

Returns an instance that is just like this one, except that it has a catch list with the given item appended to the end.
public Insn
withNewRegisters(RegisterSpec
null-ok; new result register
result
,
RegisterSpecList
non-null; new sources registers
sources
)

Implements abstract org.droidparts.dexmaker.dx.rop.code.Insn.withNewRegisters.

Returns an instance that is just like this one, except with new result and source registers.
public Insn
withRegisterOffset(int
the amount to offset register references by
delta
)

Implements abstract org.droidparts.dexmaker.dx.rop.code.Insn.withRegisterOffset.

Returns an instance that is just like this one, except that all register references have been offset by the given delta.
Inherited from org.droidparts.dexmaker.dx.rop.code.Insn:
canThrowcontentEqualscopyequalsgetLocalAssignmentgetOpcodegetPositiongetResultgetSourceshashCodetoHumantoHumanWithInlinetoStringtoStringWithInlinewithSourceLiteral

Field Detail

catchesback to summary
private final TypeList catches

non-null; list of exceptions caught

Constructor Detail

ThrowingInsnback to summary
public ThrowingInsn(Rop opcode, SourcePosition position, RegisterSpecList sources, TypeList catches)

Constructs an instance.

Parameters
opcode:Rop

non-null; the opcode

position:SourcePosition

non-null; source position

sources:RegisterSpecList

non-null; specs for all the sources

catches:TypeList

non-null; list of exceptions caught

Method Detail

acceptback to summary
public void accept(Insn.Visitor visitor)

Implements abstract org.droidparts.dexmaker.dx.rop.code.Insn.accept.

Doc from org.droidparts.dexmaker.dx.rop.code.Insn.accept.

Calls the appropriate method on the given visitor, depending on the class of this instance. Subclasses must override this.

Parameters
visitor:Insn.Visitor

non-null; the visitor to call on

Annotations
@Override
getCatchesback to summary
public TypeList getCatches()

Implements abstract org.droidparts.dexmaker.dx.rop.code.Insn.getCatches.

Doc from org.droidparts.dexmaker.dx.rop.code.Insn.getCatches.

Gets the list of possibly-caught exceptions. This returns StdTypeList#EMPTY if this instruction has no handlers, which can be either if this instruction can't possibly throw or if it merely doesn't handle any of its possible exceptions. To determine whether this instruction can throw, use canThrow.

Returns:TypeList

non-null; the catches list

Annotations
@Override
getInlineStringback to summary
public String getInlineString()

Overrides org.droidparts.dexmaker.dx.rop.code.Insn.getInlineString.

Doc from org.droidparts.dexmaker.dx.rop.code.Insn.getInlineString.

Gets an "inline" string portion for toHuman(), if available. This is the portion that appears after the Rop opcode

Returns:String

null-ok; if non-null, the inline text for toHuman()

Annotations
@Override
toCatchStringback to summary
public static String toCatchString(TypeList catches)

Gets the string form of a register spec list to be used as a catches list.

Parameters
catches:TypeList

non-null; the catches list

Returns:String

non-null; the string form

withAddedCatchback to summary
public Insn withAddedCatch(Type type)

Implements abstract org.droidparts.dexmaker.dx.rop.code.Insn.withAddedCatch.

Doc from org.droidparts.dexmaker.dx.rop.code.Insn.withAddedCatch.

Returns an instance that is just like this one, except that it has a catch list with the given item appended to the end. This method throws an exception if this instance can't possibly throw. To determine whether this instruction can throw, use canThrow.

Parameters
type:Type

non-null; type to append to the catch list

Returns:Insn

non-null; an appropriately-constructed instance

Annotations
@Override
withNewRegistersback to summary
public Insn withNewRegisters(RegisterSpec result, RegisterSpecList sources)

Implements abstract org.droidparts.dexmaker.dx.rop.code.Insn.withNewRegisters.

Doc from org.droidparts.dexmaker.dx.rop.code.Insn.withNewRegisters.

Returns an instance that is just like this one, except with new result and source registers.

Parameters
result:RegisterSpec

null-ok; new result register

sources:RegisterSpecList

non-null; new sources registers

Returns:Insn

non-null; an appropriately-constructed instance

Annotations
@Override
withRegisterOffsetback to summary
public Insn withRegisterOffset(int delta)

Implements abstract org.droidparts.dexmaker.dx.rop.code.Insn.withRegisterOffset.

Doc from org.droidparts.dexmaker.dx.rop.code.Insn.withRegisterOffset.

Returns an instance that is just like this one, except that all register references have been offset by the given delta.

Parameters
delta:int

the amount to offset register references by

Returns:Insn

non-null; an appropriately-constructed instance

Annotations
@Override