Top Description Fields Constructors Methods
com.thoughtworks.paranamer

public Class AdaptiveParanamer

extends Object
implements Paranamer
Class Inheritance
All Implemented Interfaces
com.thoughtworks.paranamer.Paranamer
Imports
java.lang.reflect.AccessibleObject

Implementation of Paranamer which chooses between a series of Paranamer instances depending on which can supply data. It prioritizes the paranamer instances according to the order they were passed in.
Authors
Paul Hammant, Mauro Talevi

Field Summary

Modifier and TypeField and Description
public static final String
private final Paranamer[]

Constructor Summary

AccessConstructor and Description
public
AdaptiveParanamer()

Use DefaultParanamer ahead of BytecodeReadingParanamer

public
AdaptiveParanamer(Paranamer...
the paranamers in question
paranamers
)

Prioritize a series of Paranamers

Method Summary

Modifier and TypeMethod and Description
public String[]
lookupParameterNames(AccessibleObject
the Method or Constructor for which the parameter names are looked up.
methodOrConstructor
)

Implements com.thoughtworks.paranamer.Paranamer.lookupParameterNames.

Lookup the parameter names of a given method.
public String[]
lookupParameterNames(AccessibleObject
the Method or Constructor for which the parameter names are looked up.
methodOrCtor
,
boolean
whether to throw an exception if no Paranamer data found (versus return null).
throwExceptionIfMissing
)

Implements com.thoughtworks.paranamer.Paranamer.lookupParameterNames.

Lookup the parameter names of a given method.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

__PARANAMER_DATAback to summary
public static final String __PARANAMER_DATA
paranamersback to summary
private final Paranamer[] paranamers

Constructor Detail

AdaptiveParanamerback to summary
public AdaptiveParanamer()

Use DefaultParanamer ahead of BytecodeReadingParanamer

AdaptiveParanamerback to summary
public AdaptiveParanamer(Paranamer... paranamers)

Prioritize a series of Paranamers

Parameters
paranamers:Paranamer[]

the paranamers in question

Method Detail

lookupParameterNamesback to summary
public String[] lookupParameterNames(AccessibleObject methodOrConstructor)

Implements com.thoughtworks.paranamer.Paranamer.lookupParameterNames.

Doc from com.thoughtworks.paranamer.Paranamer.lookupParameterNames.

Lookup the parameter names of a given method.

Parameters
methodOrConstructor:AccessibleObject

the Method or Constructor for which the parameter names are looked up.

Returns:String[]

A list of the parameter names.

lookupParameterNamesback to summary
public String[] lookupParameterNames(AccessibleObject methodOrCtor, boolean throwExceptionIfMissing)

Implements com.thoughtworks.paranamer.Paranamer.lookupParameterNames.

Doc from com.thoughtworks.paranamer.Paranamer.lookupParameterNames.

Lookup the parameter names of a given method.

Parameters
methodOrCtor:AccessibleObject

the Method or Constructor for which the parameter names are looked up.

throwExceptionIfMissing:boolean

whether to throw an exception if no Paranamer data found (versus return null).

Returns:String[]

A list of the parameter names.