EncodedMethod toEncodedMethod(DexOptions dexOptions) { RopMethod ropMethod = new RopMethod(code.toBasicBlocks(), 0); LocalVariableInfo locals = null; DalvCode dalvCode = RopTranslator.translate( ropMethod, PositionList.NONE, locals, code.paramSize(), dexOptions); return new EncodedMethod(method.constant, flags, dalvCode, StdTypeList.EMPTY); } }
/** {@inheritDoc} */ public boolean equals(Object other) { if (! (other instanceof EncodedMethod)) { return false; } return compareTo((EncodedMethod) other) == 0; }
String methName = meth.getName().getString(); if ((wildcard && methName.startsWith(methodName)) || (!wildcard && methName.equals(methodName))) { meths.put(meth.getRef().getNat(), meth); meth.debugPrint(pw, args.verboseDump); clazz.getMethodAnnotations(meth.getRef()); AnnotationsList parameterAnnotations = clazz.getParameterAnnotations(meth.getRef());
/** {@inheritDoc} */ @Override public String toString() { StringBuffer sb = new StringBuffer(100); sb.append(getClass().getName()); sb.append('{'); sb.append(Hex.u2(getAccessFlags())); sb.append(' '); sb.append(method); if (code != null) { sb.append(' '); sb.append(code); } sb.append('}'); return sb.toString(); }
/** {@inheritDoc} */ @Override public void debugPrint(PrintWriter out, boolean verbose) { if (code == null) { out.println(getRef().toHuman() + ": abstract or native"); } else { code.debugPrint(out, " ", verbose); } }
/** * Prints out the contents of this instance, in a debugging-friendly * way. * * @param out {@code non-null;} where to output to * @param verbose whether to be verbose with the output */ public void debugPrint(Writer out, boolean verbose) { PrintWriter pw = Writers.printWriterFor(out); int sz = staticFields.size(); for (int i = 0; i < sz; i++) { pw.println(" sfields[" + i + "]: " + staticFields.get(i)); } sz = instanceFields.size(); for (int i = 0; i < sz; i++) { pw.println(" ifields[" + i + "]: " + instanceFields.get(i)); } sz = directMethods.size(); for (int i = 0; i < sz; i++) { pw.println(" dmeths[" + i + "]:"); directMethods.get(i).debugPrint(pw, verbose); } sz = virtualMethods.size(); for (int i = 0; i < sz; i++) { pw.println(" vmeths[" + i + "]:"); virtualMethods.get(i).debugPrint(pw, verbose); } }
/** {@inheritDoc} */ @Override public void addContents(DexFile file) { if (!staticFields.isEmpty()) { getStaticValuesConstant(); // Force the fields to be sorted. for (EncodedField field : staticFields) { field.addContents(file); } } if (!instanceFields.isEmpty()) { Collections.sort(instanceFields); for (EncodedField field : instanceFields) { field.addContents(file); } } if (!directMethods.isEmpty()) { Collections.sort(directMethods); for (EncodedMethod method : directMethods) { method.addContents(file); } } if (!virtualMethods.isEmpty()) { Collections.sort(virtualMethods); for (EncodedMethod method : virtualMethods) { method.addContents(file); } } }
String methName = meth.getName().getString(); if ((wildcard && methName.startsWith(methodName)) || (!wildcard && methName.equals(methodName))) { meths.put(meth.getRef().getNat(), meth); meth.debugPrint(pw, args.verboseDump); clazz.getMethodAnnotations(meth.getRef()); AnnotationsList parameterAnnotations = clazz.getParameterAnnotations(meth.getRef());
/** {@inheritDoc} */ @Override public String toString() { StringBuffer sb = new StringBuffer(100); sb.append(getClass().getName()); sb.append('{'); sb.append(Hex.u2(getAccessFlags())); sb.append(' '); sb.append(method); if (code != null) { sb.append(' '); sb.append(code); } sb.append('}'); return sb.toString(); }
/** {@inheritDoc} */ @Override public void debugPrint(PrintWriter out, boolean verbose) { if (code == null) { out.println(getRef().toHuman() + ": abstract or native"); } else { code.debugPrint(out, " ", verbose); } }
/** * Prints out the contents of this instance, in a debugging-friendly * way. * * @param out {@code non-null;} where to output to * @param verbose whether to be verbose with the output */ public void debugPrint(Writer out, boolean verbose) { PrintWriter pw = Writers.printWriterFor(out); int sz = staticFields.size(); for (int i = 0; i < sz; i++) { pw.println(" sfields[" + i + "]: " + staticFields.get(i)); } sz = instanceFields.size(); for (int i = 0; i < sz; i++) { pw.println(" ifields[" + i + "]: " + instanceFields.get(i)); } sz = directMethods.size(); for (int i = 0; i < sz; i++) { pw.println(" dmeths[" + i + "]:"); directMethods.get(i).debugPrint(pw, verbose); } sz = virtualMethods.size(); for (int i = 0; i < sz; i++) { pw.println(" vmeths[" + i + "]:"); virtualMethods.get(i).debugPrint(pw, verbose); } }
/** {@inheritDoc} */ @Override public void addContents(DexFile file) { if (!staticFields.isEmpty()) { getStaticValuesConstant(); // Force the fields to be sorted. for (EncodedField field : staticFields) { field.addContents(file); } } if (!instanceFields.isEmpty()) { Collections.sort(instanceFields); for (EncodedField field : instanceFields) { field.addContents(file); } } if (!directMethods.isEmpty()) { Collections.sort(directMethods); for (EncodedMethod method : directMethods) { method.addContents(file); } } if (!virtualMethods.isEmpty()) { Collections.sort(virtualMethods); for (EncodedMethod method : virtualMethods) { method.addContents(file); } } }
String methName = meth.getName().getString(); if ((wildcard && methName.startsWith(methodName)) || (!wildcard && methName.equals(methodName))) { meths.put(meth.getRef().getNat(), meth); meth.debugPrint(pw, args.verboseDump); clazz.getMethodAnnotations(meth.getRef()); AnnotationsList parameterAnnotations = clazz.getParameterAnnotations(meth.getRef());
/** {@inheritDoc} */ @Override public String toString() { StringBuffer sb = new StringBuffer(100); sb.append(getClass().getName()); sb.append('{'); sb.append(Hex.u2(getAccessFlags())); sb.append(' '); sb.append(method); if (code != null) { sb.append(' '); sb.append(code); } sb.append('}'); return sb.toString(); }
EncodedMethod toEncodedMethod(DexOptions dexOptions) { RopMethod ropMethod = new RopMethod(code.toBasicBlocks(), 0); LocalVariableInfo locals = null; DalvCode dalvCode = RopTranslator.translate( ropMethod, PositionList.NONE, locals, code.paramSize(), dexOptions); return new EncodedMethod(method.constant, flags, dalvCode, StdTypeList.EMPTY); } }
/** {@inheritDoc} */ public boolean equals(Object other) { if (! (other instanceof EncodedMethod)) { return false; } return compareTo((EncodedMethod) other) == 0; }
/** {@inheritDoc} */ @Override public void debugPrint(PrintWriter out, boolean verbose) { if (code == null) { out.println(getRef().toHuman() + ": abstract or native"); } else { code.debugPrint(out, " ", verbose); } }
/** * Prints out the contents of this instance, in a debugging-friendly * way. * * @param out {@code non-null;} where to output to * @param verbose whether to be verbose with the output */ public void debugPrint(Writer out, boolean verbose) { PrintWriter pw = Writers.printWriterFor(out); int sz = staticFields.size(); for (int i = 0; i < sz; i++) { pw.println(" sfields[" + i + "]: " + staticFields.get(i)); } sz = instanceFields.size(); for (int i = 0; i < sz; i++) { pw.println(" ifields[" + i + "]: " + instanceFields.get(i)); } sz = directMethods.size(); for (int i = 0; i < sz; i++) { pw.println(" dmeths[" + i + "]:"); directMethods.get(i).debugPrint(pw, verbose); } sz = virtualMethods.size(); for (int i = 0; i < sz; i++) { pw.println(" vmeths[" + i + "]:"); virtualMethods.get(i).debugPrint(pw, verbose); } }
/** {@inheritDoc} */ @Override public void addContents(DexFile file) { if (!staticFields.isEmpty()) { getStaticValuesConstant(); // Force the fields to be sorted. for (EncodedField field : staticFields) { field.addContents(file); } } if (!instanceFields.isEmpty()) { Collections.sort(instanceFields); for (EncodedField field : instanceFields) { field.addContents(file); } } if (!directMethods.isEmpty()) { Collections.sort(directMethods); for (EncodedMethod method : directMethods) { method.addContents(file); } } if (!virtualMethods.isEmpty()) { Collections.sort(virtualMethods); for (EncodedMethod method : virtualMethods) { method.addContents(file); } } }
String methName = meth.getName().getString(); if ((wildcard && methName.startsWith(methodName)) || (!wildcard && methName.equals(methodName))) { meths.put(meth.getRef().getNat(), meth); meth.debugPrint(pw, args.verboseDump); clazz.getMethodAnnotations(meth.getRef()); AnnotationsList parameterAnnotations = clazz.getParameterAnnotations(meth.getRef());