public class ParamReader extends ClassReader
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.
buf, count, mark, pos
Constructor and Description |
---|
ParamReader(byte[] b)
process the given class bytes directly.
|
ParamReader(Class c)
process a class file, given it's class.
|
Modifier and Type | Method and Description |
---|---|
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, readCpool, readInt, readShort, resolveClass, resolveField, resolveMethod, resolveNameAndType, resolveUtf8, skipAttributes, skipFully
available, close, mark, markSupported, read, read, reset, skip
read
public ParamReader(Class c) throws IOException
c
- IOException
public ParamReader(byte[] b) throws IOException
b
- IOException
public void readCode() throws IOException
ClassReader
readCode
in class ClassReader
IOException
public String[] getParameterNames(Constructor ctor)
ctor
- public String[] getParameterNames(Method method)
method
- public void readLocalVariableTable() throws IOException
IOException
Copyright © The Apache Software Foundation. All Rights Reserved.