gnu.bytecode
Class ClassTypeWriter

java.lang.Object
  extended by java.io.Writer
      extended by java.io.PrintWriter
          extended by gnu.bytecode.ClassTypeWriter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable

public class ClassTypeWriter
extends java.io.PrintWriter

This class prints out in contents of a ClassType in human-readable form. The output format matches my earlier jcf-dump program (in gcc/java).


Field Summary
 
Fields inherited from class java.io.PrintWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
ClassTypeWriter(ClassType ctype, java.io.PrintStream stream, int flags)
           
ClassTypeWriter(ClassType ctype, java.io.PrintWriter stream, int flags)
           
 
Method Summary
 void print()
           
static void print(ClassType ctype, java.io.PrintStream stream, int flags)
           
static void print(ClassType ctype, java.io.PrintWriter stream, int flags)
           
 void printAttributes(AttrContainer container)
           
 void printClassInfo()
           
 void printConstantPool()
           
 void printFields()
           
 void printMethods()
           
 void printOptionalIndex(CpoolEntry entry)
           
 void printOptionalIndex(int index)
           
 void printQuotedString(java.lang.String string)
           
 void printSignature(java.lang.String sig)
          Print a signature string in Java source.
 int printSignature(java.lang.String sig, int pos)
          Print in Java source form one type from a signature string.
 void printSignature(Type type)
           
 
Methods inherited from class java.io.PrintWriter
append, append, append, checkError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassTypeWriter

public ClassTypeWriter(ClassType ctype,
                       java.io.PrintWriter stream,
                       int flags)

ClassTypeWriter

public ClassTypeWriter(ClassType ctype,
                       java.io.PrintStream stream,
                       int flags)
Method Detail

print

public static void print(ClassType ctype,
                         java.io.PrintWriter stream,
                         int flags)

print

public static void print(ClassType ctype,
                         java.io.PrintStream stream,
                         int flags)

print

public void print()

printAttributes

public void printAttributes(AttrContainer container)

printClassInfo

public void printClassInfo()

printFields

public void printFields()

printMethods

public void printMethods()

printQuotedString

public final void printQuotedString(java.lang.String string)

printConstantPool

public void printConstantPool()

printOptionalIndex

public final void printOptionalIndex(int index)

printOptionalIndex

public final void printOptionalIndex(CpoolEntry entry)

printSignature

public final int printSignature(java.lang.String sig,
                                int pos)
Print in Java source form one type from a signature string.

Parameters:
sig - the signature string to print
pos - the index in sig to start with
Returns:
the index following the signature of one type.

printSignature

public final void printSignature(java.lang.String sig)
Print a signature string in Java source.

Parameters:
sig - the signature string to print

printSignature

public final void printSignature(Type type)