Package com.android.dx.rop.cst

Examples of com.android.dx.rop.cst.Constant


              unsignedFitsInByte(regs.get(1).getReg()))) {
            return false;
        }

        CstInsn ci = (CstInsn) insn;
        Constant cst = ci.getConstant();

        if (!(cst instanceof CstLiteralBits)) {
            return false;
        }
View Full Code Here


     */
    private static void addConstants(HashSet<Constant> result, DalvInsn insn)
    {
  if (insn instanceof CstInsn)
  {
      Constant cst= ((CstInsn) insn).getConstant();
      result.add(cst);
  }
  else if (insn instanceof LocalSnapshot)
  {
      RegisterSpecSet specs= ((LocalSnapshot) insn).getLocals();
View Full Code Here

     * @param insn {@code non-null;} the instruction
     * @param callback {@code non-null;} the callback
     */
    private static void assignIndices(CstInsn insn, DalvCode.AssignIndicesCallback callback)
    {
  Constant cst= insn.getConstant();
  int index= callback.getIndex(cst);

  if (index >= 0)
  {
      insn.setIndex(index);
View Full Code Here

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

        Constant cst = ci.getConstant();
        if (!((cst instanceof CstMethodRef) ||
              (cst instanceof CstType))) {
            return false;
        }
View Full Code Here

        if (!lastType.isConstant()) {
            return this;
        }

        Constant cst = (Constant) lastType;

        RegisterSpecList newSources = sources.withoutLast();

        Rop newRop;
        try {
View Full Code Here

                    case Type.BT_INT:     return Dops.SPUT;
                }
                break;
            }
            case RegOps.CONST: {
                Constant cst = ((ThrowingCstInsn) insn).getConstant();
                if (cst instanceof CstType) {
                    return Dops.CONST_CLASS;
                } else if (cst instanceof CstString) {
                    return Dops.CONST_STRING;
                }
View Full Code Here

     * @param accessFlags the original access flags
     * @return {@code non-null;} the annotation
     */
    public static Annotation makeInnerClass(CstUtf8 name, int accessFlags) {
        Annotation result = new Annotation(INNER_CLASS_TYPE, SYSTEM);
        Constant nameCst =
            (name != null) ? new CstString(name) : CstKnownNull.THE_ONE;

        result.put(new NameValuePair(NAME_UTF, nameCst));
        result.put(new NameValuePair(ACCESS_FLAGS_UTF,
                        CstInteger.make(accessFlags)));
View Full Code Here

                annotation.getVisibility().toHuman());
        out.annotate(0, prefix + "type: " + annotation.getType().toHuman());

        for (NameValuePair pair : annotation.getNameValuePairs()) {
            CstUtf8 name = pair.getName();
            Constant value = pair.getValue();

            out.annotate(0, prefix + name.toHuman() + ": " +
                    ValueEncoder.constantToHuman(value));
        }
    }
View Full Code Here

        if (! unsignedFitsInShort(cpi)) {
            return false;
        }
       
        Constant cst = ci.getConstant();
        return (cst instanceof CstType) ||
            (cst instanceof CstFieldRef);
    }
View Full Code Here

        }
       
        out.writeUnsignedLeb128(size);

        for (int i = 0; i < size; i++) {
            Constant cst = list.get(i);
            if (annotates) {
                out.annotate("  [" + Integer.toHexString(i) + "] " +
                        constantToHuman(cst));
            }
            writeConstant(cst);
View Full Code Here

TOP

Related Classes of com.android.dx.rop.cst.Constant

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.