|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.InputStream java.io.ByteArrayInputStream org.apache.cxf.common.util.ClassReader
public class ClassReader
This is the class file reader for obtaining the parameter names for declared methods in a class. The class must have debugging attributes for us to obtain this information.
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.
Field Summary |
---|
Fields inherited from class java.io.ByteArrayInputStream |
---|
buf, count, mark, pos |
Constructor Summary | |
---|---|
protected |
ClassReader(byte[] buf,
Map<String,Method> attrMethods)
|
Method Summary | |
---|---|
protected static Map<String,Method> |
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. |
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 org.apache.cxf.common.util.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. |
Methods inherited from class java.io.ByteArrayInputStream |
---|
available, close, mark, markSupported, read, read, reset, skip |
Methods inherited from class java.io.InputStream |
---|
read |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ClassReader(byte[] buf, Map<String,Method> attrMethods)
Method Detail |
---|
protected static byte[] getBytes(Class<?> c) throws IOException
c
- the class of interest
IOException
protected static Map<String,Method> findAttributeReaders(Class<?> c)
protected static String getSignature(Member method, Class<?>[] paramTypes)
protected final int readShort()
protected final int readInt()
protected void skipFully(int n) throws IOException
IOException
protected final Member resolveMethod(int index) throws IOException, ClassNotFoundException, NoSuchMethodException
IOException
ClassNotFoundException
NoSuchMethodException
protected final Field resolveField(int i) throws IOException, ClassNotFoundException, NoSuchFieldException
IOException
ClassNotFoundException
NoSuchFieldException
protected final org.apache.cxf.common.util.ClassReader.NameAndType resolveNameAndType(int i) throws IOException
IOException
protected final Class<?> resolveClass(int i) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
protected final String resolveUtf8(int i) throws IOException
IOException
protected final void readCpool() throws IOException
IOException
protected final void skipAttributes() throws IOException
IOException
protected final void readAttributes() throws IOException
IOException
public void readCode() throws IOException
IOException
|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |