|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.thoughtworks.paranamer.AdaptiveParanamer
public class AdaptiveParanamer
Implementation of Paranamer which automatically chooses between two Paranamer implementations depending on which can supply data
Field Summary | |
---|---|
static String |
__PARANAMER_DATA
|
Fields inherited from interface com.thoughtworks.paranamer.Paranamer |
---|
EMPTY_NAMES, NO_PARAMETER_NAMES_FOR_CLASS, NO_PARAMETER_NAMES_FOR_CLASS_AND_MEMBER, NO_PARAMETER_NAMES_LIST, PARAMETER_NAMES_FOUND |
Constructor Summary | |
---|---|
AdaptiveParanamer()
Cache a DefaultParanamer's lookups. |
|
AdaptiveParanamer(Paranamer delegate,
Paranamer fallback)
Cache a primary and secondary Paranamer instance (the second is a fallback to the first) |
Method Summary | |
---|---|
int |
areParameterNamesAvailable(Class clazz,
String ctorOrMethodName)
Determine if the parameter names are available. |
String[] |
lookupParameterNames(AccessibleObject methodOrConstructor)
Lookup the parameter names of a given method. |
String[] |
lookupParameterNames(AccessibleObject methodOrCtor,
boolean throwExceptionIfMissing)
Lookup the parameter names of a given method. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String __PARANAMER_DATA
Constructor Detail |
---|
public AdaptiveParanamer()
public AdaptiveParanamer(Paranamer delegate, Paranamer fallback)
delegate
- firstfallback
- secondMethod Detail |
---|
public String[] lookupParameterNames(AccessibleObject methodOrConstructor)
Paranamer
lookupParameterNames
in interface Paranamer
methodOrConstructor
- the Method
or Constructor
for which the parameter names
are looked up.
public String[] lookupParameterNames(AccessibleObject methodOrCtor, boolean throwExceptionIfMissing)
Paranamer
lookupParameterNames
in interface Paranamer
methodOrCtor
- the Method
or Constructor
for which the parameter names
are looked up.
public int areParameterNamesAvailable(Class clazz, String ctorOrMethodName)
Paranamer
Known issues:
Paranamer.lookupParameterNames(AccessibleObject)
will succeed.Paranamer.lookupParameterNames(AccessibleObject)
will fail.
areParameterNamesAvailable
in interface Paranamer
clazz
- the name of the class to which the method or constructor belongs.ctorOrMethodName
- the base name of the Method
or Constructor
. If a
request is being made for the constructor, this should be
"<init>"
.
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |