FileDocCategorySizeDatePackage
FillArrayDataInsn.javaAPI DocAndroid 5.1 API3502Thu Mar 12 22:18:30 GMT 2015com.android.dx.rop.code

FillArrayDataInsn

public final class FillArrayDataInsn extends Insn
Instruction which fills a newly created array with a predefined list of constant values.

Fields Summary
private final ArrayList
initValues
non-null: initial values to fill the newly created array
private final com.android.dx.rop.cst.Constant
arrayType
non-null: type of the array. Will be used to determine the width of elements in the array-data table.
Constructors Summary
public FillArrayDataInsn(Rop opcode, SourcePosition position, RegisterSpecList sources, ArrayList initValues, com.android.dx.rop.cst.Constant cst)
Constructs an instance.

param
opcode {@code non-null;} the opcode
param
position {@code non-null;} source position
param
sources {@code non-null;} specs for all the sources
param
initValues {@code non-null;} list of initial values to fill the array
param
cst {@code non-null;} type of the new array

        super(opcode, position, null, sources);

        if (opcode.getBranchingness() != Rop.BRANCH_NONE) {
            throw new IllegalArgumentException("bogus branchingness");
        }

        this.initValues = initValues;
        this.arrayType = cst;
    
Methods Summary
public voidaccept(Visitor visitor)
{@inheritDoc}

        visitor.visitFillArrayDataInsn(this);
    
public com.android.dx.rop.type.TypeListgetCatches()
{@inheritDoc}

        return StdTypeList.EMPTY;
    
public com.android.dx.rop.cst.ConstantgetConstant()
Return the type of the newly created array

return
{@code non-null;} array type

        return arrayType;
    
public java.util.ArrayListgetInitValues()
Return the list of init values

return
{@code non-null;} list of init values

        return initValues;
    
public InsnwithAddedCatch(com.android.dx.rop.type.Type type)
{@inheritDoc}

        throw new  UnsupportedOperationException("unsupported");
    
public InsnwithNewRegisters(RegisterSpec result, RegisterSpecList sources)
{@inheritDoc}


        return new FillArrayDataInsn(getOpcode(), getPosition(),
                                     sources, initValues, arrayType);
    
public InsnwithRegisterOffset(int delta)
{@inheritDoc}

        return new FillArrayDataInsn(getOpcode(), getPosition(),
                                     getSources().withOffset(delta),
                                     initValues, arrayType);