FileDocCategorySizeDatePackage
FixedSizeInsn.javaAPI DocAndroid 5.1 API2558Thu Mar 12 22:18:30 GMT 2015com.android.dx.dex.code

FixedSizeInsn

public abstract class FixedSizeInsn extends DalvInsn
Base class for instructions which are of a fixed code size and which use {@link InsnFormat} methods to write themselves. This includes most — but not all — instructions.

Fields Summary
Constructors Summary
public FixedSizeInsn(Dop opcode, com.android.dx.rop.code.SourcePosition position, com.android.dx.rop.code.RegisterSpecList registers)
Constructs an instance. The output address of this instance is initially unknown ({@code -1}).

Note: In the unlikely event that an instruction takes absolutely no registers (e.g., a {@code nop} or a no-argument no-result * static method call), then the given register list may be passed as {@link RegisterSpecList#EMPTY}.

param
opcode the opcode; one of the constants from {@link Dops}
param
position {@code non-null;} source position
param
registers {@code non-null;} register list, including a result register if appropriate (that is, registers may be either ins or outs)

        super(opcode, position, registers);
    
Methods Summary
public final intcodeSize()
{@inheritDoc}

        return getOpcode().getFormat().codeSize();
    
protected final java.lang.StringlistingString0(boolean noteIndices)
{@inheritDoc}

        return getOpcode().getFormat().listingString(this, noteIndices);
    
public final DalvInsnwithRegisterOffset(int delta)
{@inheritDoc}

        return withRegisters(getRegisters().withOffset(delta));
    
public final voidwriteTo(com.android.dx.util.AnnotatedOutput out)
{@inheritDoc}

        getOpcode().getFormat().writeTo(out, this);