Package com.android.dx.rop.cst

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


        out.writeUnsignedLeb128(size);

        int at = 0;
        for (NameValuePair pair : pairs) {
            CstUtf8 name = pair.getName();
            int nameIdx = stringIds.indexOf(name);
            Constant value = pair.getValue();
           
            if (annotates) {
                out.annotate(0, "  elements[" + at + "]:");
                at++;
                out.annotate("    name_idx: " + Hex.u4(nameIdx) + " // " +
                        name.toHuman());
            }

            out.writeUnsignedLeb128(nameIdx);

            if (annotates) {
View Full Code Here


     * @param string {@code non-null;} the string to intern, as a regular Java
     * {@code String}
     * @return {@code non-null;} the interned string
     */
    public StringIdItem intern(String string) {
        CstUtf8 utf8 = new CstUtf8(string);
        return intern(new StringIdItem(utf8));
    }
View Full Code Here

     *
     * @param string {@code non-null;} the string to intern, as a {@link CstString}
     * @return {@code non-null;} the interned string
     */
    public StringIdItem intern(CstString string) {
        CstUtf8 utf8 = string.getString();
        return intern(new StringIdItem(utf8));
    }
View Full Code Here

            throw new NullPointerException("string == null");
        }

        throwIfPrepared();

        CstUtf8 value = string.getValue();
        StringIdItem already = strings.get(value);

        if (already != null) {
            return already;
        }
View Full Code Here

        for (int i = 0; i < size; i++) {
            sb.append(shortFormCharFor(parameters.getType(i)));
        }

        return new CstUtf8(sb.toString());
    }
View Full Code Here

        for (int i = 0; i < descriptorSize; i++) {
            Item item = descriptorList.get(i);
            Item signatureItem = signatureList.itemToLocal(item);
            if (signatureItem != null) {
                CstUtf8 signature = signatureItem.getSignature();
                item = item.withSignature(signature);
            }
            result.set(i, item);
        }       
View Full Code Here

            /*
             * The (default) source file is an attribute of the class, but
             * it's useful to see it in method dumps.
             */
            CstUtf8 sourceFile = clazz.getSourceFile();
            if (sourceFile != null) {
                pw.println("  source file: " + sourceFile.toQuoted());
            }

            Annotations methodAnnotations =
                clazz.getMethodAnnotations(meth.getRef());
            AnnotationsList parameterAnnotations =
View Full Code Here

    if (instruction instanceof CodeAddress)
    {
      // We put debug information about source code positions into the
      // code so that we can control the debugger.
      SourcePosition sourcePosition= instruction.getPosition();
      CstUtf8 sourceFile= sourcePosition.getSourceFile();
      int sourceLine= sourcePosition.getLine();
      if (sourceFile != null && !sourceLinesAlreadyPut.contains(sourceLine))
      {
        dexInstruction= new Element("source-position", NS_XMLVM);
        dexInstruction.setAttribute("file", sourceFile.toHuman());
        dexInstruction.setAttribute("line", String.valueOf(sourceLine));
        sourceLinesAlreadyPut.add(sourceLine);
      }
    }
    else if (instruction instanceof LocalSnapshot)
View Full Code Here

TOP

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

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.