本文整理了Java中com.android.dx.util.Writers.printWriterFor()
方法的一些代码示例,展示了Writers.printWriterFor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Writers.printWriterFor()
方法的具体详情如下:
包路径:com.android.dx.util.Writers
类名称: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
/**
* 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);
}
}
代码示例来源:origin: com.android.tools.build/builder
/**
* 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);
}
}
代码示例来源:origin: com.jakewharton.android.repackaged/dalvik-dx
/**
* 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);
}
}
代码示例来源:origin: com.google.dexmaker/dexmaker-dx
/**
* 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);
}
}
代码示例来源:origin: nikita36078/J2ME-Loader
/**
* 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);
}
}
代码示例来源:origin: com.google.android.tools/dx
/**
* 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);
}
}
代码示例来源:origin: com.android/dx
/**
* 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);
}
}
代码示例来源:origin: dragome/dragome-sdk
/**
* 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);
}
}
代码示例来源:origin: dragome/dragome-sdk
/**
* 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);
pw.println(getClass().getName() + " {");
pw.println(" accessFlags: " + Hex.u2(accessFlags));
pw.println(" superclass: " + superclass);
pw.println(" interfaces: " +
((interfaces == null) ? "<none>" : interfaces));
pw.println(" sourceFile: " +
((sourceFile == null) ? "<none>" : sourceFile.toQuoted()));
classData.debugPrint(out, verbose);
annotationsDirectory.debugPrint(pw);
pw.println("}");
}
}
代码示例来源:origin: com.android.tools.build/builder
/**
* 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);
pw.println(getClass().getName() + " {");
pw.println(" accessFlags: " + Hex.u2(accessFlags));
pw.println(" superclass: " + superclass);
pw.println(" interfaces: " +
((interfaces == null) ? "<none>" : interfaces));
pw.println(" sourceFile: " +
((sourceFile == null) ? "<none>" : sourceFile.toQuoted()));
classData.debugPrint(out, verbose);
annotationsDirectory.debugPrint(pw);
pw.println("}");
}
}
代码示例来源:origin: com.jakewharton.android.repackaged/dalvik-dx
/**
* 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);
pw.println(getClass().getName() + " {");
pw.println(" accessFlags: " + Hex.u2(accessFlags));
pw.println(" superclass: " + superclass);
pw.println(" interfaces: " +
((interfaces == null) ? "<none>" : interfaces));
pw.println(" sourceFile: " +
((sourceFile == null) ? "<none>" : sourceFile.toQuoted()));
classData.debugPrint(out, verbose);
annotationsDirectory.debugPrint(pw);
pw.println("}");
}
}
代码示例来源:origin: com.google.android.tools/dx
/**
* 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);
pw.println(getClass().getName() + " {");
pw.println(" accessFlags: " + Hex.u2(accessFlags));
pw.println(" superclass: " + superclass);
pw.println(" interfaces: " +
((interfaces == null) ? "<none>" : interfaces));
pw.println(" sourceFile: " +
((sourceFile == null) ? "<none>" : sourceFile.toQuoted()));
classData.debugPrint(out, verbose);
annotationsDirectory.debugPrint(pw);
pw.println("}");
}
}
代码示例来源:origin: com.android/dx
/**
* 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);
pw.println(getClass().getName() + " {");
pw.println(" accessFlags: " + Hex.u2(accessFlags));
pw.println(" superclass: " + superclass);
pw.println(" interfaces: " +
((interfaces == null) ? "<none>" : interfaces));
pw.println(" sourceFile: " +
((sourceFile == null) ? "<none>" : sourceFile.toQuoted()));
classData.debugPrint(out, verbose);
annotationsDirectory.debugPrint(pw);
pw.println("}");
}
}
代码示例来源:origin: com.google.dexmaker/dexmaker-dx
/**
* 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);
pw.println(getClass().getName() + " {");
pw.println(" accessFlags: " + Hex.u2(accessFlags));
pw.println(" superclass: " + superclass);
pw.println(" interfaces: " +
((interfaces == null) ? "<none>" : interfaces));
pw.println(" sourceFile: " +
((sourceFile == null) ? "<none>" : sourceFile.toQuoted()));
classData.debugPrint(out, verbose);
annotationsDirectory.debugPrint(pw);
pw.println("}");
}
}
代码示例来源:origin: gdpancheng/LoonAndroid3
/**
* 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);
pw.println(getClass().getName() + " {");
pw.println(" accessFlags: " + Hex.u2(accessFlags));
pw.println(" superclass: " + superclass);
pw.println(" interfaces: " +
((interfaces == null) ? "<none>" : interfaces));
pw.println(" sourceFile: " +
((sourceFile == null) ? "<none>" : sourceFile.toQuoted()));
classData.debugPrint(out, verbose);
annotationsDirectory.debugPrint(pw);
pw.println("}");
}
}
内容来源于网络,如有侵权,请联系作者删除!