\n");
+ out.write("");
+ out.write(escape(name));
+ out.write(" | \n");
+ out.write("" + (partialPercent != null ? partialPercent.toString() : "") + " | ");
+ out.write("" + (percent != null ? percent.toString() : "") + " | ");
+ out.write("
\n");
+ }
+
+ private String escape(String string) {
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < string.length(); ++i) {
+ char ch = string.charAt(i);
+ switch (ch) {
+ case '<':
+ sb.append("<");
+ break;
+ case '>':
+ sb.append(">");
+ break;
+ case '"':
+ sb.append(""");
+ break;
+ default:
+ sb.append(ch);
+ break;
+ }
+ }
+ return sb.toString();
+ }
}
diff --git a/teavm-classlib/src/main/java/org/teavm/classlib/impl/JCLComparisonVisitor.java b/teavm-classlib/src/main/java/org/teavm/classlib/impl/JCLComparisonVisitor.java
index ea412d88a..09b218461 100644
--- a/teavm-classlib/src/main/java/org/teavm/classlib/impl/JCLComparisonVisitor.java
+++ b/teavm-classlib/src/main/java/org/teavm/classlib/impl/JCLComparisonVisitor.java
@@ -15,7 +15,7 @@
*/
package org.teavm.classlib.impl;
-import java.io.PrintStream;
+import java.util.Map;
import org.objectweb.asm.*;
import org.teavm.model.*;
import org.teavm.model.ClassReader;
@@ -25,84 +25,103 @@ import org.teavm.model.ClassReader;
* @author Alexey Andreev
*/
class JCLComparisonVisitor implements ClassVisitor {
- private PrintStream out;
+ private Map