Class listclass

java.lang.Object
  |
  +--listclass

public class listclass
extends java.lang.Object

Read class file(s) and display its contents. The command line usage is:

java listclass [-constants] [-code] [-brief] [-dependencies] [-nocontents] [-recurse] class... [-exclude ]
where

Here's a couple examples of how I typically use listclass:

java listclass -code MyClass
Print information about the class and the byte code of the methods
java listclass -nocontents -dependencies MyClass
Print a list of all classes which MyClass depends on.
java listclass -nocontents -recurse MyClass -exclude java. javax. sun.
Print a recursive listing of all classes which MyClass depends on. Do not analyze classes beginning with "java.", "javax.", or "sun.".
java listclass -nocontents -dependencies -recurse MyClass -exclude java.javax. sun.
Print a recursive listing of dependency information for MyClass and its dependents. Do not analyze classes beginning with "java.", "javax.", or "sun."

Version:
$Id: listclass.java,v 1.8 2001/10/11 11:59:26 dahm Exp $
Author:
M. Dahm, Thomas Wheeler

Constructor Summary
listclass(boolean code, boolean constants, boolean verbose, boolean classdep, boolean nocontents, boolean recurse, java.util.Vector exclude_name)
           
 
Method Summary
static java.lang.String[] getClassDependencies(ConstantPool pool)
           
 void list(java.lang.String name)
          Print the given class on screen
static void main(java.lang.String[] argv)
           
static void printClassDependencies(ConstantPool pool)
          Dump the list of classes this class is dependent on
static void printCode(Method[] methods, boolean verbose)
          Dump the disassembled code of all methods in the class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

listclass

public listclass(boolean code,
                 boolean constants,
                 boolean verbose,
                 boolean classdep,
                 boolean nocontents,
                 boolean recurse,
                 java.util.Vector exclude_name)
Method Detail

main

public static void main(java.lang.String[] argv)

list

public void list(java.lang.String name)
Print the given class on screen

printClassDependencies

public static void printClassDependencies(ConstantPool pool)
Dump the list of classes this class is dependent on

getClassDependencies

public static java.lang.String[] getClassDependencies(ConstantPool pool)

printCode

public static void printCode(Method[] methods,
                             boolean verbose)
Dump the disassembled code of all methods in the class.