phelps.lang.reflect
public class ClassFile extends Object
The JavaTM Virtual Machine Specification, Second Edition
by Tim Lindholm and Frank Yellin
STATUS: Doesn't read method exception table, inner classes.
Related work: BIT: Bytecode Instrumenting Tool by Han Lee and Ben Zorn. They determined basic blocks, supported insertion of calls (only; not arbitrary code), and implemented write().
Version: $Revision: 1.3 $ $Date: 2003/06/01 07:58:57 $
See Also: java.lang.reflect
Field Summary | |
---|---|
short | access_flags |
Attribute_info[] | attributes |
ClassFile | component |
Cp_info[] | constant_pool |
int | dimensions |
Field_info[] | fields |
String[] | interfaces |
short | major_version |
Method_info[] | methods |
short | minor_version |
String | pkg |
String | super_class |
String | this_class |
Constructor Summary | |
---|---|
ClassFile(ClassFile component, int dimensions) For arrays. | |
ClassFile(File f) | |
ClassFile(InputStream is) | |
ClassFile(byte[] bytes) |
Method Summary | |
---|---|
static String | access2String(int access) |
static ClassFile | forName(String name) |
Attribute_info | getAttribute(Attribute_info[] ai, String name) |
Method_info[] | getDeclaredMethods() |
int | getModifiers() |
String | getName() |
String | getPackage() |
String | getSuperclass() |
boolean | isArray() |
boolean | isAssignableFrom(ClassFile subclass)
Returns true if this class is a subclass of superclass.
|
boolean | isPrimitive() |
protected void | load() |
static void | putPool(ClassFile cf) Add ClassFile to pool of known classes, for better isAssignableFrom(). |
static int | sizeof(String type) Don't know sizes of arrays and Objects statically. |
String | toString() |
static String | type2String(String type) |