FileDocCategorySizeDatePackage
Form21t.javaAPI DocAndroid 1.5 API2942Wed May 06 22:41:02 BST 2009com.android.dx.dex.code.form

Form21t

public final class Form21t extends com.android.dx.dex.code.InsnFormat
Instruction format 21t. See the instruction format spec for details.

Fields Summary
public static final com.android.dx.dex.code.InsnFormat
THE_ONE
non-null; unique instance of this class
Constructors Summary
private Form21t()
Constructs an instance. This class is not publicly instantiable. Use {@link #THE_ONE}.


                     
      
        // This space intentionally left blank.
    
Methods Summary
public booleanbranchFits(com.android.dx.dex.code.TargetInsn insn)
{@inheritDoc}

        int offset = insn.getTargetOffset();

        // Note: A zero offset would fit, but it is prohibited by the spec.
        return (offset != 0) && signedFitsInShort(offset);
    
public intcodeSize()
{@inheritDoc}

        return 2;
    
public java.lang.StringinsnArgString(com.android.dx.dex.code.DalvInsn insn)
{@inheritDoc}

        RegisterSpecList regs = insn.getRegisters();
        return regs.get(0).regString() + ", " + branchString(insn);
    
public java.lang.StringinsnCommentString(com.android.dx.dex.code.DalvInsn insn, boolean noteIndices)
{@inheritDoc}

        return branchComment(insn);
    
public booleanisCompatible(com.android.dx.dex.code.DalvInsn insn)
{@inheritDoc}

        RegisterSpecList regs = insn.getRegisters();

        if (!((insn instanceof TargetInsn) &&
              (regs.size() == 1) &&
              unsignedFitsInByte(regs.get(0).getReg()))) {
            return false;
        }

        TargetInsn ti = (TargetInsn) insn;
        return ti.hasTargetOffset() ? branchFits(ti) : true;
    
public com.android.dx.dex.code.InsnFormatnextUp()
{@inheritDoc}

        return Form31t.THE_ONE;
    
public voidwriteTo(com.android.dx.util.AnnotatedOutput out, com.android.dx.dex.code.DalvInsn insn)
{@inheritDoc}

        RegisterSpecList regs = insn.getRegisters();
        int offset = ((TargetInsn) insn).getTargetOffset();

        write(out,
              opcodeUnit(insn, regs.get(0).getReg()),
              (short) offset);