org.apache.axis.utils.bytecode
public class ClassReader extends ByteArrayInputStream
This does not work for inherited methods. To obtain parameter names for inherited methods, you must use a paramReader for the class that originally declared the method.
don't get tricky, it's the bare minimum. Instances of this class are not threadsafe -- don't share them.
Constructor Summary | |
---|---|
protected | ClassReader(byte[] buf, Map attrMethods) |
Method Summary | |
---|---|
protected static Map | findAttributeReaders(Class c) |
protected static byte[] | getBytes(Class c)
load the bytecode for a given class, by using the class's defining
classloader and assuming that for a class named P.C, the bytecodes are
in a resource named /P/C.class. |
protected static String | getSignature(Member method, Class[] paramTypes) |
protected void | readAttributes()
read an attributes array. the elements of a class file that
can contain attributes are: fields, methods, the class itself,
and some other types of attributes. |
void | readCode()
read a code attribute |
protected void | readCpool() |
protected int | readInt() |
protected int | readShort() |
protected Class | resolveClass(int i) |
protected Field | resolveField(int i) |
protected Member | resolveMethod(int index) |
protected ClassReader.NameAndType | resolveNameAndType(int i) |
protected String | resolveUtf8(int i) |
protected void | skipAttributes() |
protected void | skipFully(int n)
skip n bytes in the input stream. |
Parameters: c the class of interest
Returns: a byte array containing the bytecode
Throws: IOException
Throws: IOException
Returns: the next signed 32 bit value
Returns: the next unsigned 16 bit value