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<?>[] pTypes) |
String[] |
getParameterNames(Method method)
return the names of the declared parameters for the given method.
|
static String[] |
getParameterNamesFromDebugInfo(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.
|
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 static String[] getParameterNamesFromDebugInfo(Method method)
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 © 2018 JBoss by Red Hat. All rights reserved.