public class XbeanAsmParameterNameLoader extends java.lang.Object implements ParameterNameLoader
Modifier and Type | Class and Description |
---|---|
private static class |
XbeanAsmParameterNameLoader.AllParameterNamesDiscoveringVisitor |
Modifier and Type | Field and Description |
---|---|
private java.util.WeakHashMap<java.lang.reflect.Constructor,java.util.List<java.lang.String>> |
constructorCache
Weak map from Constructor to List<String>.
|
private java.util.WeakHashMap<java.lang.reflect.Method,java.util.List<java.lang.String>> |
methodCache
Weak map from Method to List<String>.
|
Constructor and Description |
---|
XbeanAsmParameterNameLoader() |
Modifier and Type | Method and Description |
---|---|
private static org.objectweb.asm.ClassReader |
createClassReader(java.lang.Class declaringClass) |
java.util.List<java.lang.String> |
get(java.lang.reflect.Constructor constructor)
Gets the parameter names of the specified constructor or null if the class was compiled without debug symbols on.
|
java.util.List<java.lang.String> |
get(java.lang.reflect.Method method)
Gets the parameter names of the specified method or null if the class was compiled without debug symbols on.
|
java.util.Map<java.lang.reflect.Constructor,java.util.List<java.lang.String>> |
getAllConstructorParameters(java.lang.Class clazz)
Gets the parameter names of all constructor or null if the class was compiled without debug symbols on.
|
java.util.Map<java.lang.reflect.Method,java.util.List<java.lang.String>> |
getAllMethodParameters(java.lang.Class clazz,
java.lang.String methodName)
Gets the parameter names of all methods with the specified name or null if the class was compiled without debug symbols on.
|
private java.lang.reflect.Method[] |
getMethods(java.lang.Class clazz,
java.lang.String methodName) |
private final java.util.WeakHashMap<java.lang.reflect.Constructor,java.util.List<java.lang.String>> constructorCache
private final java.util.WeakHashMap<java.lang.reflect.Method,java.util.List<java.lang.String>> methodCache
public java.util.List<java.lang.String> get(java.lang.reflect.Method method)
get
in interface ParameterNameLoader
method
- the method for which the parameter names should be retrievedpublic java.util.List<java.lang.String> get(java.lang.reflect.Constructor constructor)
get
in interface ParameterNameLoader
constructor
- the constructor for which the parameters should be retrievedpublic java.util.Map<java.lang.reflect.Constructor,java.util.List<java.lang.String>> getAllConstructorParameters(java.lang.Class clazz)
clazz
- the class for which the constructor parameter names should be retrievedpublic java.util.Map<java.lang.reflect.Method,java.util.List<java.lang.String>> getAllMethodParameters(java.lang.Class clazz, java.lang.String methodName)
clazz
- the class for which the method parameter names should be retrievedmethodName
- the of the method for which the parameters should be retrievedprivate java.lang.reflect.Method[] getMethods(java.lang.Class clazz, java.lang.String methodName)
private static org.objectweb.asm.ClassReader createClassReader(java.lang.Class declaringClass) throws java.io.IOException
java.io.IOException