Class ClassPrinter
java.lang.Object
com.ibm.wala.shrike.shrikeBT.shrikeCT.tools.ClassPrinter
This class prints the contents of a class file. It's like an alternative to javap that shows more
information.
In Unix I run it like this: java -cp ~/dev/shrike/shrike com.ibm.wala.shrikeBT.shrikeCT.tools.ClassPrinter test.jar This will print the contents of every class in the JAR file.
- Author:
- roca
-
Constructor Summary
ConstructorDescriptionGet ready to print a class to the given output stream. -
Method Summary
Modifier and TypeMethodDescriptionvoid
doClass
(ClassReader cr) Print a class.static void
void
setPrintConstantPool
(boolean b) Controls whether to print all the constant pool entries.void
setPrintLineNumberInfo
(boolean b) Controls whether to print line number information.
-
Constructor Details
-
ClassPrinter
Get ready to print a class to the given output stream.
-
-
Method Details
-
setPrintLineNumberInfo
public void setPrintLineNumberInfo(boolean b) Controls whether to print line number information. The default is 'true'. -
setPrintConstantPool
public void setPrintConstantPool(boolean b) Controls whether to print all the constant pool entries. The default is 'true'. -
main
-
doClass
public void doClass(ClassReader cr) throws InvalidClassFileException, Decoder.InvalidBytecodeException, IOException Print a class.- Throws:
IllegalArgumentException
- if cr is nullInvalidClassFileException
Decoder.InvalidBytecodeException
IOException
-