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

public final Class ArrayData

extends VariableSizeInsn
Class Inheritance
Imports
org.droidparts.dexmaker.dx.io.Opcodes, org.droidparts.dexmaker.dx.rop.code.RegisterSpecList, .SourcePosition, org.droidparts.dexmaker.dx.rop.cst.Constant, .CstLiteral32, .CstLiteral64, .CstType, org.droidparts.dexmaker.dx.util.AnnotatedOutput, .Hex, java.util.ArrayList

Pseudo-instruction which holds fill array data.

Field Summary

Modifier and TypeField and Description
private final Constant
arrayType

non-null: type of constant that initializes the array

private final int
elemWidth

Width of the init value element

private final int
initLength

Length of the init list

private final CodeAddress
user

non-null; address representing the instruction that uses this instance

private final ArrayList<Constant>
values

non-null; initial values to be filled into an array

Constructor Summary

AccessConstructor and Description
public
ArrayData(SourcePosition
non-null; source position
position
,
CodeAddress
non-null; address representing the instruction that uses this instance
user
,
ArrayList<Constant>
non-null; initial values to be filled into an array
values
,
Constant arrayType)

Constructs an instance.

Method Summary

Modifier and TypeMethod and Description
protected String
argString()

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.argString.

Gets the string form for any arguments to this instance.
public int
codeSize()

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.codeSize.

Gets the size of this instruction, in 16-bit code units.
protected String
listingString0(boolean
whether to include an explicit notation of constant pool indices
noteIndices
)

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.listingString0.

Helper for listingString, which returns the string form of this instance suitable for inclusion in a human-oriented listing dump, not including the instruction address and without respect for any output formatting.
public DalvInsn
withRegisters(RegisterSpecList
non-null; new register list
registers
)

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.withRegisters.

Returns an instance that is just like this one, except that the register list is replaced by the given one, and its address is reset.
public void
writeTo(AnnotatedOutput
non-null; where to write to
out
)

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.writeTo.

Writes this instance to the given output.
Inherited from org.droidparts.dexmaker.dx.dex.code.VariableSizeInsn:
withOpcodewithRegisterOffset

Field Detail

arrayTypeback to summary
private final Constant arrayType

non-null: type of constant that initializes the array

elemWidthback to summary
private final int elemWidth

Width of the init value element

initLengthback to summary
private final int initLength

Length of the init list

userback to summary
private final CodeAddress user

non-null; address representing the instruction that uses this instance

valuesback to summary
private final ArrayList<Constant> values

non-null; initial values to be filled into an array

Constructor Detail

ArrayDataback to summary
public ArrayData(SourcePosition position, CodeAddress user, ArrayList<Constant> values, Constant arrayType)

Constructs an instance. The output address of this instance is initially unknown (-1).

Parameters
position:SourcePosition

non-null; source position

user:CodeAddress

non-null; address representing the instruction that uses this instance

values:ArrayList<Constant>

non-null; initial values to be filled into an array

Method Detail

argStringback to summary
protected String argString()

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.argString.

Doc from org.droidparts.dexmaker.dx.dex.code.DalvInsn.argString.

Gets the string form for any arguments to this instance. Subclasses must override this.

Returns:String

null-ok; the string version of any arguments or null if there are none

Annotations
@Override
codeSizeback to summary
public int codeSize()

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.codeSize.

Doc from org.droidparts.dexmaker.dx.dex.code.DalvInsn.codeSize.

Gets the size of this instruction, in 16-bit code units.

Returns:int

>= 0; the code size of this instruction

Annotations
@Override
listingString0back to summary
protected String listingString0(boolean noteIndices)

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.listingString0.

Doc from org.droidparts.dexmaker.dx.dex.code.DalvInsn.listingString0.

Helper for listingString, which returns the string form of this instance suitable for inclusion in a human-oriented listing dump, not including the instruction address and without respect for any output formatting. This method should return null if this instance should not appear in a listing.

Parameters
noteIndices:boolean

whether to include an explicit notation of constant pool indices

Returns:String

null-ok; the listing string

Annotations
@Override
withRegistersback to summary
public DalvInsn withRegisters(RegisterSpecList registers)

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.withRegisters.

Doc from org.droidparts.dexmaker.dx.dex.code.DalvInsn.withRegisters.

Returns an instance that is just like this one, except that the register list is replaced by the given one, and its address is reset.

Parameters
registers:RegisterSpecList

non-null; new register list

Returns:DalvInsn

non-null; an appropriately-constructed instance

Annotations
@Override
writeToback to summary
public void writeTo(AnnotatedOutput out)

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.writeTo.

Doc from org.droidparts.dexmaker.dx.dex.code.DalvInsn.writeTo.

Writes this instance to the given output. This method should never annotate the output.

Parameters
out:AnnotatedOutput

non-null; where to write to

Annotations
@Override