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

public final Class FillArrayDataInsn

extends Insn
Class Inheritance
Imports
org.droidparts.dexmaker.dx.rop.cst.Constant, org.droidparts.dexmaker.dx.rop.type.StdTypeList, .Type, .TypeList, java.util.ArrayList

Instruction which fills a newly created array with a predefined list of constant values.

Field Summary

Modifier and TypeField and Description
private final Constant
arrayType

non-null: type of the array.

private final ArrayList<Constant>
initValues

non-null: initial values to fill the newly created array

Constructor Summary

AccessConstructor and Description
public
FillArrayDataInsn(Rop
non-null; the opcode
opcode
,
SourcePosition
non-null; source position
position
,
RegisterSpecList
non-null; specs for all the sources
sources
,
ArrayList<Constant>
non-null; list of initial values to fill the array
initValues
,
Constant
non-null; type of the new array
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 Constant

Returns:

non-null; array type
getConstant
()

Return the type of the newly created array

public ArrayList<Constant>

Returns:

non-null; list of init values
getInitValues
()

Return the list of init values

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:
canThrowcontentEqualscopyequalsgetInlineStringgetLocalAssignmentgetOpcodegetPositiongetResultgetSourceshashCodetoHumantoHumanWithInlinetoStringtoStringWithInlinewithSourceLiteral

Field Detail

arrayTypeback to summary
private final Constant arrayType

non-null: type of the array. Will be used to determine the width of elements in the array-data table.

initValuesback to summary
private final ArrayList<Constant> initValues

non-null: initial values to fill the newly created array

Constructor Detail

FillArrayDataInsnback to summary
public FillArrayDataInsn(Rop opcode, SourcePosition position, RegisterSpecList sources, ArrayList<Constant> initValues, 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

initValues:ArrayList<Constant>

non-null; list of initial values to fill the array

cst:Constant

non-null; type of the new array

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
getConstantback to summary
public Constant getConstant()

Return the type of the newly created array

Returns:Constant

non-null; array type

getInitValuesback to summary
public ArrayList<Constant> getInitValues()

Return the list of init values

Returns:ArrayList<Constant>

non-null; list of init values

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