org.apache.axis.utils.bytecode
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.
- Edwin Smith, Macromedia
ParamReader(Class c) - process a class file, given it's class.
|
ParamReader(byte[] b) - process the given class bytes directly.
|
String[] | getParameterNames(Constructor ctor) - return the names of the declared parameters for the given constructor.
|
protected String[] | getParameterNames(Member member, Class[] paramTypes)
|
String[] | getParameterNames(Method method) - return the names of the declared parameters for the given method.
|
void | readCode() - read a code attribute
|
void | readLocalVariableTable() - this is invoked when a LocalVariableTable attribute is encountered.
|
findAttributeReaders , getBytes , getSignature , readAttributes , readCode , readCpool , readInt , readShort , resolveClass , resolveField , resolveMethod , resolveNameAndType , resolveUtf8 , skipAttributes , skipFully |
ParamReader
public ParamReader(Class c)
throws IOException
process a class file, given it's class. We'll use the defining
classloader to locate the bytecode.
c
-
ParamReader
public ParamReader(byte[] b)
throws IOException
process the given class bytes directly.
b
-
getParameterNames
public String[] getParameterNames(Constructor ctor)
return the names of the declared parameters for the given constructor.
If we cannot determine the names, return null. The returned array will
have one name per parameter. The length of the array will be the same
as the length of the Class[] array returned by Constructor.getParameterTypes().
ctor
-
- String[] array of names, one per parameter, or null
getParameterNames
protected String[] getParameterNames(Member member,
Class[] paramTypes)
getParameterNames
public String[] getParameterNames(Method method)
return the names of the declared parameters for the given method.
If we cannot determine the names, return null. The returned array will
have one name per parameter. The length of the array will be the same
as the length of the Class[] array returned by Method.getParameterTypes().
method
-
- String[] array of names, one per parameter, or null
readCode
public void readCode()
throws IOException
read a code attribute
- readCode in interface ClassReader
readLocalVariableTable
public void readLocalVariableTable()
throws IOException
this is invoked when a LocalVariableTable attribute is encountered.
Copyright B) 2005 Apache Web Services Project. All Rights Reserved.