FileDocCategorySizeDatePackage
ThrowingCstInsn.javaAPI DocAndroid 5.1 API3302Thu Mar 12 22:18:30 GMT 2015com.android.dexgen.rop.code

ThrowingCstInsn

public final class ThrowingCstInsn extends CstInsn
Instruction which contains an explicit reference to a constant and which might throw an exception.

Fields Summary
private final com.android.dexgen.rop.type.TypeList
catches
{@code non-null;} list of exceptions caught
Constructors Summary
public ThrowingCstInsn(Rop opcode, SourcePosition position, RegisterSpecList sources, com.android.dexgen.rop.type.TypeList catches, com.android.dexgen.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
catches {@code non-null;} list of exceptions caught
param
cst {@code non-null;} the constant

        super(opcode, position, null, sources, cst);

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

        if (catches == null) {
            throw new NullPointerException("catches == null");
        }

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

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

        return catches;
    
public java.lang.StringgetInlineString()
{@inheritDoc}

        return getConstant().toHuman() + " " +
                                 ThrowingInsn.toCatchString(catches);
    
public InsnwithAddedCatch(com.android.dexgen.rop.type.Type type)
{@inheritDoc}

        return new ThrowingCstInsn(getOpcode(), getPosition(),
                                   getSources(), catches.withAddedType(type),
                                   getConstant());
    
public InsnwithNewRegisters(RegisterSpec result, RegisterSpecList sources)
{@inheritDoc}


        return new ThrowingCstInsn(getOpcode(), getPosition(),
                                   sources,
                                   catches,
                                   getConstant());
    
public InsnwithRegisterOffset(int delta)
{@inheritDoc}

        return new ThrowingCstInsn(getOpcode(), getPosition(),
                                   getSources().withOffset(delta),
                                   catches,
                                   getConstant());