Commit 48eae6d8 authored by ebruneton's avatar ebruneton
Browse files

indentation (Ctrrl+Shift+F)

parent f51d80bf
......@@ -48,7 +48,7 @@ import org.objectweb.asm.signature.SignatureReader;
* visitor chain to trace the class that is visited at a given point in this
* chain. This may be uselful for debugging purposes. <p> The trace printed when
* visiting the <tt>Hello</tt> class is the following: <p> <blockquote>
*
*
* <pre>
* // class version 49.0 (49)
* // access flags 33
......@@ -74,9 +74,9 @@ import org.objectweb.asm.signature.SignatureReader;
* MAXLOCALS = 1
* }
* </pre>
*
*
* </blockquote> where <tt>Hello</tt> is defined by: <p> <blockquote>
*
*
* <pre>
* public class Hello {
*
......@@ -85,9 +85,9 @@ import org.objectweb.asm.signature.SignatureReader;
* }
* }
* </pre>
*
*
* </blockquote>
*
*
* @author Eric Bruneton
* @author Eugene Kuleshov
*/
......@@ -110,9 +110,9 @@ public class TraceClassVisitor extends TraceAbstractVisitor implements
* Prints a disassembled view of the given class to the standard output. <p>
* Usage: TraceClassVisitor [-debug] &lt;fully qualified class name or class
* file name &gt;
*
*
* @param args the command line arguments.
*
*
* @throws Exception if the class cannot be found, or if an IO exception
* occurs.
*/
......@@ -152,7 +152,7 @@ public class TraceClassVisitor extends TraceAbstractVisitor implements
/**
* Constructs a new {@link TraceClassVisitor}.
*
*
* @param pw the print writer to be used to print the class.
*/
public TraceClassVisitor(final PrintWriter pw) {
......@@ -161,7 +161,7 @@ public class TraceClassVisitor extends TraceAbstractVisitor implements
/**
* Constructs a new {@link TraceClassVisitor}.
*
*
* @param cv the {@link ClassVisitor} to which this visitor delegates calls.
* May be <tt>null</tt>.
* @param pw the print writer to be used to print the class.
......@@ -274,7 +274,7 @@ public class TraceClassVisitor extends TraceAbstractVisitor implements
buf.append(tab).append("OUTERCLASS ");
appendDescriptor(INTERNAL_NAME, owner);
// if enclosing name is null, so why should we show this info?
if(name != null) {
if (name != null) {
buf.append(' ').append(name).append(' ');
} else {
buf.append(' ');
......@@ -317,7 +317,8 @@ public class TraceClassVisitor extends TraceAbstractVisitor implements
final int access)
{
buf.setLength(0);
buf.append(tab).append("// access flags ").append(access & ~Opcodes.ACC_SUPER).append('\n');
buf.append(tab).append("// access flags ").append(access
& ~Opcodes.ACC_SUPER).append('\n');
buf.append(tab);
appendAccess(access);
buf.append("INNERCLASS ");
......@@ -489,7 +490,7 @@ public class TraceClassVisitor extends TraceAbstractVisitor implements
/**
* Appends a string representation of the given access modifiers to {@link
* #buf buf}.
*
*
* @param access some access modifiers.
*/
private void appendAccess(final int access) {
......
......@@ -39,53 +39,53 @@ import org.objectweb.asm.signature.SignatureReader;
/**
* ClassSignatureDecompilerTest
*
*
* @author Eugene Kuleshov
*/
public class TraceSignatureVisitorTest extends TestCase {
private static String[] DATA = {
"C|E|<E extends java.lang.Enum<E>> implements java.lang.Comparable<E>, java.io.Serializable" +
"|<E:Ljava/lang/Enum<TE;>;>Ljava/lang/Object;Ljava/lang/Comparable<TE;>;Ljava/io/Serializable;",
"C|E|<E extends java.lang.Enum<E>> implements java.lang.Comparable<E>, java.io.Serializable"
+ "|<E:Ljava/lang/Enum<TE;>;>Ljava/lang/Object;Ljava/lang/Comparable<TE;>;Ljava/io/Serializable;",
"C|I|<D extends java.lang.reflect.GenericDeclaration> extends java.lang.reflect.Type" +
"|<D::Ljava/lang/reflect/GenericDeclaration;>Ljava/lang/Object;Ljava/lang/reflect/Type;",
"C|I|<D extends java.lang.reflect.GenericDeclaration> extends java.lang.reflect.Type"
+ "|<D::Ljava/lang/reflect/GenericDeclaration;>Ljava/lang/Object;Ljava/lang/reflect/Type;",
"C|C|<K, V> extends java.util.AbstractMap<K, V> implements java.util.concurrent.ConcurrentMap<K, V>, java.io.Serializable" +
"|<K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/util/AbstractMap<TK;TV;>;Ljava/util/concurrent/ConcurrentMap<TK;TV;>;Ljava/io/Serializable;",
"C|C|<K, V> extends java.util.AbstractMap<K, V> implements java.util.concurrent.ConcurrentMap<K, V>, java.io.Serializable"
+ "|<K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/util/AbstractMap<TK;TV;>;Ljava/util/concurrent/ConcurrentMap<TK;TV;>;Ljava/io/Serializable;",
"C|C|<K extends java.lang.Enum<K>, V> extends java.util.AbstractMap<K, V> implements java.io.Serializable, java.lang.Cloneable" +
"|<K:Ljava/lang/Enum<TK;>;V:Ljava/lang/Object;>Ljava/util/AbstractMap<TK;TV;>;Ljava/io/Serializable;Ljava/lang/Cloneable;",
"C|C|<K extends java.lang.Enum<K>, V> extends java.util.AbstractMap<K, V> implements java.io.Serializable, java.lang.Cloneable"
+ "|<K:Ljava/lang/Enum<TK;>;V:Ljava/lang/Object;>Ljava/util/AbstractMap<TK;TV;>;Ljava/io/Serializable;Ljava/lang/Cloneable;",
"F|C|java.lang.Class<?>|Ljava/lang/Class<*>;",
"F|C|java.lang.reflect.Constructor<T>|Ljava/lang/reflect/Constructor<TT;>;",
"F|C|T[]|[TT;",
"F|C|java.util.Hashtable<?, ?>|Ljava/util/Hashtable<**>;",
"F|C|java.util.concurrent.atomic.AtomicReferenceFieldUpdater<java.io.BufferedInputStream, byte[]>" +
"|Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater<Ljava/io/BufferedInputStream;[B>;",
"F|C|java.util.concurrent.atomic.AtomicReferenceFieldUpdater<java.io.BufferedInputStream, byte[]>"
+ "|Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater<Ljava/io/BufferedInputStream;[B>;",
"F|C|AA<byte[][]>|LAA<[[B>;",
"F|C|AA<java.util.Map<java.lang.String, java.lang.String>[][]>" +
"|LAA<[[Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;>;",
"F|C|AA<java.util.Map<java.lang.String, java.lang.String>[][]>"
+ "|LAA<[[Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;>;",
"F|C|java.util.Hashtable<java.lang.Object, java.lang.String>" +
"|Ljava/util/Hashtable<Ljava/lang/Object;Ljava/lang/String;>;",
"F|C|java.util.Hashtable<java.lang.Object, java.lang.String>"
+ "|Ljava/util/Hashtable<Ljava/lang/Object;Ljava/lang/String;>;",
"M|C|void()E|()V^TE;",
"M|C|void(java.lang.String, java.lang.Class<?>, java.lang.reflect.Method[], java.lang.reflect.Method, java.lang.reflect.Method)" +
"|(Ljava/lang/String;Ljava/lang/Class<*>;[Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;)V",
"M|C|void(java.lang.String, java.lang.Class<?>, java.lang.reflect.Method[], java.lang.reflect.Method, java.lang.reflect.Method)"
+ "|(Ljava/lang/String;Ljava/lang/Class<*>;[Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;)V",
"M|C|java.util.Map<java.lang.Object, java.lang.String>(java.lang.Object, java.util.Map<java.lang.Object, java.lang.String>)" +
"|(Ljava/lang/Object;Ljava/util/Map<Ljava/lang/Object;Ljava/lang/String;>;)Ljava/util/Map<Ljava/lang/Object;Ljava/lang/String;>;",
"M|C|java.util.Map<java.lang.Object, java.lang.String>(java.lang.Object, java.util.Map<java.lang.Object, java.lang.String>)"
+ "|(Ljava/lang/Object;Ljava/util/Map<Ljava/lang/Object;Ljava/lang/String;>;)Ljava/util/Map<Ljava/lang/Object;Ljava/lang/String;>;",
"M|C|java.util.Map<java.lang.Object, java.lang.String><T>(java.lang.Object, java.util.Map<java.lang.Object, java.lang.String>, T)" +
"|<T:Ljava/lang/Object;>(Ljava/lang/Object;Ljava/util/Map<Ljava/lang/Object;Ljava/lang/String;>;TT;)Ljava/util/Map<Ljava/lang/Object;Ljava/lang/String;>;",
"M|C|java.util.Map<java.lang.Object, java.lang.String><T>(java.lang.Object, java.util.Map<java.lang.Object, java.lang.String>, T)"
+ "|<T:Ljava/lang/Object;>(Ljava/lang/Object;Ljava/util/Map<Ljava/lang/Object;Ljava/lang/String;>;TT;)Ljava/util/Map<Ljava/lang/Object;Ljava/lang/String;>;",
"M|C|java.util.Map<java.lang.Object, java.lang.String><E, T extends java.lang.Comparable<E>>(java.lang.Object, java.util.Map<java.lang.Object, java.lang.String>, T)" +
"|<E:Ljava/lang/Object;T::Ljava/lang/Comparable<TE;>;>(Ljava/lang/Object;Ljava/util/Map<Ljava/lang/Object;Ljava/lang/String;>;TT;)Ljava/util/Map<Ljava/lang/Object;Ljava/lang/String;>;",
"M|C|java.util.Map<java.lang.Object, java.lang.String><E, T extends java.lang.Comparable<E>>(java.lang.Object, java.util.Map<java.lang.Object, java.lang.String>, T)"
+ "|<E:Ljava/lang/Object;T::Ljava/lang/Comparable<TE;>;>(Ljava/lang/Object;Ljava/util/Map<Ljava/lang/Object;Ljava/lang/String;>;TT;)Ljava/util/Map<Ljava/lang/Object;Ljava/lang/String;>;",
};
};
public static TestSuite suite() {
TestSuite suite = new TestSuite(TraceSignatureVisitorTest.class.getName());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment