FileDocCategorySizeDatePackage
Form22c.javaAPI DocAndroid 5.1 API3249Thu Mar 12 22:18:30 GMT 2015com.android.dexgen.dex.code.form

Form22c

public final class Form22c extends com.android.dexgen.dex.code.InsnFormat
Instruction format {@code 22c}. See the instruction format spec for details.

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


                     
      
        // This space intentionally left blank.
    
Methods Summary
public intcodeSize()
{@inheritDoc}

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

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

        if (noteIndices) {
            return cstComment(insn);
        } else {
            return "";
        }
    
public booleanisCompatible(com.android.dexgen.dex.code.DalvInsn insn)
{@inheritDoc}

        RegisterSpecList regs = insn.getRegisters();
        if (!((insn instanceof CstInsn) &&
              (regs.size() == 2) &&
              unsignedFitsInNibble(regs.get(0).getReg()) &&
              unsignedFitsInNibble(regs.get(1).getReg()))) {
            return false;
        }

        CstInsn ci = (CstInsn) insn;
        int cpi = ci.getIndex();

        if (! unsignedFitsInShort(cpi)) {
            return false;
        }

        Constant cst = ci.getConstant();
        return (cst instanceof CstType) ||
            (cst instanceof CstFieldRef);
    
public com.android.dexgen.dex.code.InsnFormatnextUp()
{@inheritDoc}

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

        RegisterSpecList regs = insn.getRegisters();
        int cpi = ((CstInsn) insn).getIndex();

        write(out,
              opcodeUnit(insn,
                         makeByte(regs.get(0).getReg(), regs.get(1).getReg())),
              (short) cpi);