gnu.bytecode

Class dump


public class dump
extends ClassFileInput

Class to read a ClassType from a DataInputStream (.class file).

Constructor Summary

dump(InputStream str)

Method Summary

static void
main(String[] args)
Reads a .class file, and prints out the contents to System.out.
void
printAttributes()
Attribute
readAttribute(String name, int length, AttrContainer container)
ConstantPool
readConstants()
static void
usage()

Methods inherited from class gnu.bytecode.ClassFileInput

readAttribute, readAttributes, readClassInfo, readClassType, readConstants, readFields, readHeader, readMethods, skipAttribute

Constructor Details

dump

public dump(InputStream str)
            throws IOException,
                   ClassFormatError

Method Details

main

public static void main(String[] args)
Reads a .class file, and prints out the contents to System.out. Very rudimentary - prints out the constant pool, and field and method names and types, but only minimal attributes (i.e. no dis-assembly yet).
Parameters:
args - One argument - the name of a .class file.

printAttributes

public void printAttributes()

readAttribute

public Attribute readAttribute(String name,
                               int length,
                               AttrContainer container)
            throws IOException
Overrides:
readAttribute in interface ClassFileInput

readConstants

public ConstantPool readConstants()
            throws IOException
Overrides:
readConstants in interface ClassFileInput

usage

public static void usage()