Top Description Fields Constructors Methods
com.thoughtworks.paranamer

public Class PositionalParanamer

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

Paranamer that works on basis of the parameter position and can be used as last fallback of the AdaptiveParanamer.
Author
Stefan Fleiter

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
public
PositionalParanamer()

Default Contstructor with prefix arg.

public
PositionalParanamer(String
string that is prepended before the position of the parameter.
prefix
)

Constructor that allows to override the prefix.

Method Summary

Modifier and TypeMethod and Description
private int
count(AccessibleObject methodOrCtor)

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

prefixback to summary
private final String prefix

Constructor Detail

PositionalParanamerback to summary
public PositionalParanamer()

Default Contstructor with prefix arg.

PositionalParanamerback to summary
public PositionalParanamer(String prefix)

Constructor that allows to override the prefix.

Parameters
prefix:String

string that is prepended before the position of the parameter.

Method Detail

countback to summary
private int count(AccessibleObject methodOrCtor)
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.