FileDocCategorySizeDatePackage
ThrowingCstInsn.javaAPI DocAndroid 1.5 API3239Wed May 06 22:41:02 BST 2009com.android.dx.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.dx.rop.type.TypeList
catches
non-null; list of exceptions caught
Constructors Summary
public ThrowingCstInsn(Rop opcode, SourcePosition position, RegisterSpecList sources, com.android.dx.rop.type.TypeList catches, com.android.dx.rop.cst.Constant cst)
Constructs an instance.

param
opcode non-null; the opcode
param
position non-null; source position
param
sources non-null; specs for all the sources
param
catches non-null; list of exceptions caught
param
cst 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.dx.rop.type.TypeListgetCatches()
{@inheritDoc}

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

        return getConstant().toHuman() + " " +
                                 ThrowingInsn.toCatchString(catches);
    
public InsnwithAddedCatch(com.android.dx.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());