Top Description Methods
org.junit.jupiter.params.support

public Interface ParameterDeclaration

Known Direct Implementers
org.junit.jupiter.params.ResolverFacade.ResolvableParameterDeclaration
Annotations
@API
status:EXPERIMENTAL
since:6.0
Static Imports
org.apiguardian.api.API.Status.EXPERIMENTAL

ParameterDeclaration encapsulates the declaration of an indexed @ParameterizedClass or @ParameterizedTest parameter.
Since
5.13
See Also
ParameterDeclarations

Method Summary

Modifier and TypeMethod and Description
public AnnotatedElement

Returns:

the AnnotatedElement that declares the parameter; never null
getAnnotatedElement
()

Returns the AnnotatedElement that declares the parameter; never null.

public int

Returns:

the index of the parameter
getParameterIndex
()

Returns the index of the parameter.

public Optional<String>

Returns:

the name of the parameter, if available; never null but potentially empty
getParameterName
()

Returns the name of the parameter, if available; never null but potentially empty.

public Class<?>

Returns:

the type of the parameter; never null
getParameterType
()

Returns the type of the parameter; never null.

Method Detail

getAnnotatedElementback to summary
public AnnotatedElement getAnnotatedElement()

Returns the AnnotatedElement that declares the parameter; never null.

This is either a java.lang.reflect.Parameter or a java.lang.reflect.Field.

Returns:AnnotatedElement

the AnnotatedElement that declares the parameter; never null

getParameterIndexback to summary
public int getParameterIndex()

Returns the index of the parameter.

Returns:int

the index of the parameter

getParameterNameback to summary
public Optional<String> getParameterName()

Returns the name of the parameter, if available; never null but potentially empty.

Returns:Optional<String>

the name of the parameter, if available; never null but potentially empty

getParameterTypeback to summary
public Class<?> getParameterType()

Returns the type of the parameter; never null.

Returns:Class<?>

the type of the parameter; never null