com.android.dx.util.Writers.printWriterFor()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(12.1k)|赞(0)|评价(0)|浏览(110)

本文整理了Java中com.android.dx.util.Writers.printWriterFor()方法的一些代码示例,展示了Writers.printWriterFor()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Writers.printWriterFor()方法的具体详情如下:
包路径:com.android.dx.util.Writers
类名称:Writers
方法名:printWriterFor

Writers.printWriterFor介绍

[英]Makes a PrintWriter for the given Writer, returning the given writer if it already happens to be the right class.
[中]为给定的Writer生成一个PrintWriter,如果给定的Writer恰好是正确的类,则返回该Writer。

代码示例

代码示例来源:origin: gdpancheng/LoonAndroid3

  1. /**
  2. * Prints out the contents of this instance, in a debugging-friendly
  3. * way.
  4. *
  5. * @param out {@code non-null;} where to output to
  6. * @param verbose whether to be verbose with the output
  7. */
  8. public void debugPrint(Writer out, boolean verbose) {
  9. PrintWriter pw = Writers.printWriterFor(out);
  10. int sz = staticFields.size();
  11. for (int i = 0; i < sz; i++) {
  12. pw.println(" sfields[" + i + "]: " + staticFields.get(i));
  13. }
  14. sz = instanceFields.size();
  15. for (int i = 0; i < sz; i++) {
  16. pw.println(" ifields[" + i + "]: " + instanceFields.get(i));
  17. }
  18. sz = directMethods.size();
  19. for (int i = 0; i < sz; i++) {
  20. pw.println(" dmeths[" + i + "]:");
  21. directMethods.get(i).debugPrint(pw, verbose);
  22. }
  23. sz = virtualMethods.size();
  24. for (int i = 0; i < sz; i++) {
  25. pw.println(" vmeths[" + i + "]:");
  26. virtualMethods.get(i).debugPrint(pw, verbose);
  27. }
  28. }

代码示例来源:origin: com.android.tools.build/builder

  1. /**
  2. * Prints out the contents of this instance, in a debugging-friendly
  3. * way.
  4. *
  5. * @param out {@code non-null;} where to output to
  6. * @param verbose whether to be verbose with the output
  7. */
  8. public void debugPrint(Writer out, boolean verbose) {
  9. PrintWriter pw = Writers.printWriterFor(out);
  10. int sz = staticFields.size();
  11. for (int i = 0; i < sz; i++) {
  12. pw.println(" sfields[" + i + "]: " + staticFields.get(i));
  13. }
  14. sz = instanceFields.size();
  15. for (int i = 0; i < sz; i++) {
  16. pw.println(" ifields[" + i + "]: " + instanceFields.get(i));
  17. }
  18. sz = directMethods.size();
  19. for (int i = 0; i < sz; i++) {
  20. pw.println(" dmeths[" + i + "]:");
  21. directMethods.get(i).debugPrint(pw, verbose);
  22. }
  23. sz = virtualMethods.size();
  24. for (int i = 0; i < sz; i++) {
  25. pw.println(" vmeths[" + i + "]:");
  26. virtualMethods.get(i).debugPrint(pw, verbose);
  27. }
  28. }

代码示例来源:origin: com.jakewharton.android.repackaged/dalvik-dx

  1. /**
  2. * Prints out the contents of this instance, in a debugging-friendly
  3. * way.
  4. *
  5. * @param out {@code non-null;} where to output to
  6. * @param verbose whether to be verbose with the output
  7. */
  8. public void debugPrint(Writer out, boolean verbose) {
  9. PrintWriter pw = Writers.printWriterFor(out);
  10. int sz = staticFields.size();
  11. for (int i = 0; i < sz; i++) {
  12. pw.println(" sfields[" + i + "]: " + staticFields.get(i));
  13. }
  14. sz = instanceFields.size();
  15. for (int i = 0; i < sz; i++) {
  16. pw.println(" ifields[" + i + "]: " + instanceFields.get(i));
  17. }
  18. sz = directMethods.size();
  19. for (int i = 0; i < sz; i++) {
  20. pw.println(" dmeths[" + i + "]:");
  21. directMethods.get(i).debugPrint(pw, verbose);
  22. }
  23. sz = virtualMethods.size();
  24. for (int i = 0; i < sz; i++) {
  25. pw.println(" vmeths[" + i + "]:");
  26. virtualMethods.get(i).debugPrint(pw, verbose);
  27. }
  28. }

代码示例来源:origin: com.google.dexmaker/dexmaker-dx

  1. /**
  2. * Prints out the contents of this instance, in a debugging-friendly
  3. * way.
  4. *
  5. * @param out {@code non-null;} where to output to
  6. * @param verbose whether to be verbose with the output
  7. */
  8. public void debugPrint(Writer out, boolean verbose) {
  9. PrintWriter pw = Writers.printWriterFor(out);
  10. int sz = staticFields.size();
  11. for (int i = 0; i < sz; i++) {
  12. pw.println(" sfields[" + i + "]: " + staticFields.get(i));
  13. }
  14. sz = instanceFields.size();
  15. for (int i = 0; i < sz; i++) {
  16. pw.println(" ifields[" + i + "]: " + instanceFields.get(i));
  17. }
  18. sz = directMethods.size();
  19. for (int i = 0; i < sz; i++) {
  20. pw.println(" dmeths[" + i + "]:");
  21. directMethods.get(i).debugPrint(pw, verbose);
  22. }
  23. sz = virtualMethods.size();
  24. for (int i = 0; i < sz; i++) {
  25. pw.println(" vmeths[" + i + "]:");
  26. virtualMethods.get(i).debugPrint(pw, verbose);
  27. }
  28. }

代码示例来源:origin: nikita36078/J2ME-Loader

  1. /**
  2. * Prints out the contents of this instance, in a debugging-friendly
  3. * way.
  4. *
  5. * @param out {@code non-null;} where to output to
  6. * @param verbose whether to be verbose with the output
  7. */
  8. public void debugPrint(Writer out, boolean verbose) {
  9. PrintWriter pw = Writers.printWriterFor(out);
  10. int sz = staticFields.size();
  11. for (int i = 0; i < sz; i++) {
  12. pw.println(" sfields[" + i + "]: " + staticFields.get(i));
  13. }
  14. sz = instanceFields.size();
  15. for (int i = 0; i < sz; i++) {
  16. pw.println(" ifields[" + i + "]: " + instanceFields.get(i));
  17. }
  18. sz = directMethods.size();
  19. for (int i = 0; i < sz; i++) {
  20. pw.println(" dmeths[" + i + "]:");
  21. directMethods.get(i).debugPrint(pw, verbose);
  22. }
  23. sz = virtualMethods.size();
  24. for (int i = 0; i < sz; i++) {
  25. pw.println(" vmeths[" + i + "]:");
  26. virtualMethods.get(i).debugPrint(pw, verbose);
  27. }
  28. }

代码示例来源:origin: com.google.android.tools/dx

  1. /**
  2. * Prints out the contents of this instance, in a debugging-friendly
  3. * way.
  4. *
  5. * @param out {@code non-null;} where to output to
  6. * @param verbose whether to be verbose with the output
  7. */
  8. public void debugPrint(Writer out, boolean verbose) {
  9. PrintWriter pw = Writers.printWriterFor(out);
  10. int sz = staticFields.size();
  11. for (int i = 0; i < sz; i++) {
  12. pw.println(" sfields[" + i + "]: " + staticFields.get(i));
  13. }
  14. sz = instanceFields.size();
  15. for (int i = 0; i < sz; i++) {
  16. pw.println(" ifields[" + i + "]: " + instanceFields.get(i));
  17. }
  18. sz = directMethods.size();
  19. for (int i = 0; i < sz; i++) {
  20. pw.println(" dmeths[" + i + "]:");
  21. directMethods.get(i).debugPrint(pw, verbose);
  22. }
  23. sz = virtualMethods.size();
  24. for (int i = 0; i < sz; i++) {
  25. pw.println(" vmeths[" + i + "]:");
  26. virtualMethods.get(i).debugPrint(pw, verbose);
  27. }
  28. }

代码示例来源:origin: com.android/dx

  1. /**
  2. * Prints out the contents of this instance, in a debugging-friendly
  3. * way.
  4. *
  5. * @param out {@code non-null;} where to output to
  6. * @param verbose whether to be verbose with the output
  7. */
  8. public void debugPrint(Writer out, boolean verbose) {
  9. PrintWriter pw = Writers.printWriterFor(out);
  10. int sz = staticFields.size();
  11. for (int i = 0; i < sz; i++) {
  12. pw.println(" sfields[" + i + "]: " + staticFields.get(i));
  13. }
  14. sz = instanceFields.size();
  15. for (int i = 0; i < sz; i++) {
  16. pw.println(" ifields[" + i + "]: " + instanceFields.get(i));
  17. }
  18. sz = directMethods.size();
  19. for (int i = 0; i < sz; i++) {
  20. pw.println(" dmeths[" + i + "]:");
  21. directMethods.get(i).debugPrint(pw, verbose);
  22. }
  23. sz = virtualMethods.size();
  24. for (int i = 0; i < sz; i++) {
  25. pw.println(" vmeths[" + i + "]:");
  26. virtualMethods.get(i).debugPrint(pw, verbose);
  27. }
  28. }

代码示例来源:origin: dragome/dragome-sdk

  1. /**
  2. * Prints out the contents of this instance, in a debugging-friendly
  3. * way.
  4. *
  5. * @param out {@code non-null;} where to output to
  6. * @param verbose whether to be verbose with the output
  7. */
  8. public void debugPrint(Writer out, boolean verbose) {
  9. PrintWriter pw = Writers.printWriterFor(out);
  10. int sz = staticFields.size();
  11. for (int i = 0; i < sz; i++) {
  12. pw.println(" sfields[" + i + "]: " + staticFields.get(i));
  13. }
  14. sz = instanceFields.size();
  15. for (int i = 0; i < sz; i++) {
  16. pw.println(" ifields[" + i + "]: " + instanceFields.get(i));
  17. }
  18. sz = directMethods.size();
  19. for (int i = 0; i < sz; i++) {
  20. pw.println(" dmeths[" + i + "]:");
  21. directMethods.get(i).debugPrint(pw, verbose);
  22. }
  23. sz = virtualMethods.size();
  24. for (int i = 0; i < sz; i++) {
  25. pw.println(" vmeths[" + i + "]:");
  26. virtualMethods.get(i).debugPrint(pw, verbose);
  27. }
  28. }

代码示例来源:origin: dragome/dragome-sdk

  1. /**
  2. * Prints out the contents of this instance, in a debugging-friendly
  3. * way.
  4. *
  5. * @param out {@code non-null;} where to output to
  6. * @param verbose whether to be verbose with the output
  7. */
  8. public void debugPrint(Writer out, boolean verbose) {
  9. PrintWriter pw = Writers.printWriterFor(out);
  10. pw.println(getClass().getName() + " {");
  11. pw.println(" accessFlags: " + Hex.u2(accessFlags));
  12. pw.println(" superclass: " + superclass);
  13. pw.println(" interfaces: " +
  14. ((interfaces == null) ? "<none>" : interfaces));
  15. pw.println(" sourceFile: " +
  16. ((sourceFile == null) ? "<none>" : sourceFile.toQuoted()));
  17. classData.debugPrint(out, verbose);
  18. annotationsDirectory.debugPrint(pw);
  19. pw.println("}");
  20. }
  21. }

代码示例来源:origin: com.android.tools.build/builder

  1. /**
  2. * Prints out the contents of this instance, in a debugging-friendly
  3. * way.
  4. *
  5. * @param out {@code non-null;} where to output to
  6. * @param verbose whether to be verbose with the output
  7. */
  8. public void debugPrint(Writer out, boolean verbose) {
  9. PrintWriter pw = Writers.printWriterFor(out);
  10. pw.println(getClass().getName() + " {");
  11. pw.println(" accessFlags: " + Hex.u2(accessFlags));
  12. pw.println(" superclass: " + superclass);
  13. pw.println(" interfaces: " +
  14. ((interfaces == null) ? "<none>" : interfaces));
  15. pw.println(" sourceFile: " +
  16. ((sourceFile == null) ? "<none>" : sourceFile.toQuoted()));
  17. classData.debugPrint(out, verbose);
  18. annotationsDirectory.debugPrint(pw);
  19. pw.println("}");
  20. }
  21. }

代码示例来源:origin: com.jakewharton.android.repackaged/dalvik-dx

  1. /**
  2. * Prints out the contents of this instance, in a debugging-friendly
  3. * way.
  4. *
  5. * @param out {@code non-null;} where to output to
  6. * @param verbose whether to be verbose with the output
  7. */
  8. public void debugPrint(Writer out, boolean verbose) {
  9. PrintWriter pw = Writers.printWriterFor(out);
  10. pw.println(getClass().getName() + " {");
  11. pw.println(" accessFlags: " + Hex.u2(accessFlags));
  12. pw.println(" superclass: " + superclass);
  13. pw.println(" interfaces: " +
  14. ((interfaces == null) ? "<none>" : interfaces));
  15. pw.println(" sourceFile: " +
  16. ((sourceFile == null) ? "<none>" : sourceFile.toQuoted()));
  17. classData.debugPrint(out, verbose);
  18. annotationsDirectory.debugPrint(pw);
  19. pw.println("}");
  20. }
  21. }

代码示例来源:origin: com.google.android.tools/dx

  1. /**
  2. * Prints out the contents of this instance, in a debugging-friendly
  3. * way.
  4. *
  5. * @param out {@code non-null;} where to output to
  6. * @param verbose whether to be verbose with the output
  7. */
  8. public void debugPrint(Writer out, boolean verbose) {
  9. PrintWriter pw = Writers.printWriterFor(out);
  10. pw.println(getClass().getName() + " {");
  11. pw.println(" accessFlags: " + Hex.u2(accessFlags));
  12. pw.println(" superclass: " + superclass);
  13. pw.println(" interfaces: " +
  14. ((interfaces == null) ? "<none>" : interfaces));
  15. pw.println(" sourceFile: " +
  16. ((sourceFile == null) ? "<none>" : sourceFile.toQuoted()));
  17. classData.debugPrint(out, verbose);
  18. annotationsDirectory.debugPrint(pw);
  19. pw.println("}");
  20. }
  21. }

代码示例来源:origin: com.android/dx

  1. /**
  2. * Prints out the contents of this instance, in a debugging-friendly
  3. * way.
  4. *
  5. * @param out {@code non-null;} where to output to
  6. * @param verbose whether to be verbose with the output
  7. */
  8. public void debugPrint(Writer out, boolean verbose) {
  9. PrintWriter pw = Writers.printWriterFor(out);
  10. pw.println(getClass().getName() + " {");
  11. pw.println(" accessFlags: " + Hex.u2(accessFlags));
  12. pw.println(" superclass: " + superclass);
  13. pw.println(" interfaces: " +
  14. ((interfaces == null) ? "<none>" : interfaces));
  15. pw.println(" sourceFile: " +
  16. ((sourceFile == null) ? "<none>" : sourceFile.toQuoted()));
  17. classData.debugPrint(out, verbose);
  18. annotationsDirectory.debugPrint(pw);
  19. pw.println("}");
  20. }
  21. }

代码示例来源:origin: com.google.dexmaker/dexmaker-dx

  1. /**
  2. * Prints out the contents of this instance, in a debugging-friendly
  3. * way.
  4. *
  5. * @param out {@code non-null;} where to output to
  6. * @param verbose whether to be verbose with the output
  7. */
  8. public void debugPrint(Writer out, boolean verbose) {
  9. PrintWriter pw = Writers.printWriterFor(out);
  10. pw.println(getClass().getName() + " {");
  11. pw.println(" accessFlags: " + Hex.u2(accessFlags));
  12. pw.println(" superclass: " + superclass);
  13. pw.println(" interfaces: " +
  14. ((interfaces == null) ? "<none>" : interfaces));
  15. pw.println(" sourceFile: " +
  16. ((sourceFile == null) ? "<none>" : sourceFile.toQuoted()));
  17. classData.debugPrint(out, verbose);
  18. annotationsDirectory.debugPrint(pw);
  19. pw.println("}");
  20. }
  21. }

代码示例来源:origin: gdpancheng/LoonAndroid3

  1. /**
  2. * Prints out the contents of this instance, in a debugging-friendly
  3. * way.
  4. *
  5. * @param out {@code non-null;} where to output to
  6. * @param verbose whether to be verbose with the output
  7. */
  8. public void debugPrint(Writer out, boolean verbose) {
  9. PrintWriter pw = Writers.printWriterFor(out);
  10. pw.println(getClass().getName() + " {");
  11. pw.println(" accessFlags: " + Hex.u2(accessFlags));
  12. pw.println(" superclass: " + superclass);
  13. pw.println(" interfaces: " +
  14. ((interfaces == null) ? "<none>" : interfaces));
  15. pw.println(" sourceFile: " +
  16. ((sourceFile == null) ? "<none>" : sourceFile.toQuoted()));
  17. classData.debugPrint(out, verbose);
  18. annotationsDirectory.debugPrint(pw);
  19. pw.println("}");
  20. }
  21. }

相关文章

Writers类方法