|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.ByteArrayInputStream
org.apache.cxf.common.util.ClassReader
org.apache.cxf.common.util.ParamReader
public class ParamReader
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 | |
---|---|
ParamReader(byte[] b)
process the given class bytes directly. |
|
ParamReader(java.lang.Class c)
process a class file, given it's class. |
Method Summary | |
---|---|
java.lang.String[] |
getParameterNames(java.lang.reflect.Constructor ctor)
return the names of the declared parameters for the given constructor. |
protected java.lang.String[] |
getParameterNames(java.lang.reflect.Member member,
java.lang.Class[] pTypes)
|
java.lang.String[] |
getParameterNames(java.lang.reflect.Method method)
return the names of the declared parameters for the given method. |
static java.lang.String[] |
getParameterNamesFromDebugInfo(java.lang.reflect.Method method)
Retrieve a list of function parameter names from a method Returns null if unable to read parameter names (i.e. |
void |
readCode()
read a code attribute |
void |
readLocalVariableTable()
this is invoked when a LocalVariableTable attribute is encountered. |
Methods inherited from class org.apache.cxf.common.util.ClassReader |
---|
findAttributeReaders, getBytes, getSignature, readAttributes, readCpool, readInt, readShort, resolveClass, resolveField, resolveMethod, resolveNameAndType, resolveUtf8, skipAttributes, skipFully |
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 |
---|
public ParamReader(java.lang.Class c) throws java.io.IOException
c
-
java.io.IOException
public ParamReader(byte[] b) throws java.io.IOException
b
-
java.io.IOException
Method Detail |
---|
public static java.lang.String[] getParameterNamesFromDebugInfo(java.lang.reflect.Method method)
public void readCode() throws java.io.IOException
ClassReader
readCode
in class ClassReader
java.io.IOException
public java.lang.String[] getParameterNames(java.lang.reflect.Constructor ctor)
ctor
-
public java.lang.String[] getParameterNames(java.lang.reflect.Method method)
method
-
protected java.lang.String[] getParameterNames(java.lang.reflect.Member member, java.lang.Class[] pTypes)
public void readLocalVariableTable() throws java.io.IOException
java.io.IOException
|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |