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

public final Class ThrowingCstInsn

extends CstInsn
Class Inheritance
Imports
org.droidparts.dexmaker.dx.rop.cst.Constant, .CstString, org.droidparts.dexmaker.dx.rop.type.Type, .TypeList

Instruction which contains an explicit reference to a constant and which might throw an exception.

Field Summary

Modifier and TypeField and Description
private final TypeList
catches

non-null; list of exceptions caught

Constructor Summary

AccessConstructor and Description
public
ThrowingCstInsn(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
,
Constant
non-null; the constant
cst
)

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.CstInsn.getInlineString.

Gets an "inline" string portion for toHuman(), if available.
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.CstInsn:
contentEqualsgetConstant

Field Detail

catchesback to summary
private final TypeList catches

non-null; list of exceptions caught

Constructor Detail

ThrowingCstInsnback to summary
public ThrowingCstInsn(Rop opcode, SourcePosition position, RegisterSpecList sources, TypeList catches, Constant cst)

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

cst:Constant

non-null; the constant

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.CstInsn.getInlineString.

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

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

Returns:String

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

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

Annotations
@Override
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