Package org.bremersee.apiclient.webflux
Class InvocationParameter
- java.lang.Object
-
- org.bremersee.apiclient.webflux.Invocation
-
- org.bremersee.apiclient.webflux.InvocationParameter
-
public class InvocationParameter extends Invocation
The invocation parameter.- Author:
- Christian Bremer
-
-
Constructor Summary
Constructors Constructor Description InvocationParameter(Invocation invocation, Parameter parameter, Object value, int index)
Instantiates a new invocation parameter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <A extends Annotation>
Optional<A>findParameterAnnotation(Class<A> annotationType)
Find parameter annotation.String
getParameterName()
Gets parameter name.boolean
hasNoneParameterAnnotation(Set<Class<? extends Annotation>> annotationTypes)
Has none parameter annotation.boolean
hasParameterAnnotation(Class<? extends Annotation> annotationType)
Has parameter annotation.<E,A extends Annotation>
org.springframework.util.MultiValueMap<String,E>toMultiValueMap(Class<A> annotationType, Function<A,String> keyExtractor, Function<Object,E> valueMapper)
To multi value map.String
toString()
-
Methods inherited from class org.bremersee.apiclient.webflux.Invocation
findAnnotationValueOnMethod, findAnnotationValueOnParameter, findAnnotationValueOnTargetClass, toMethodParameterStream
-
-
-
-
Constructor Detail
-
InvocationParameter
public InvocationParameter(Invocation invocation, Parameter parameter, Object value, int index)
Instantiates a new invocation parameter.- Parameters:
invocation
- the invocationparameter
- the parametervalue
- the valueindex
- the index
-
-
Method Detail
-
getParameterName
public String getParameterName()
Gets parameter name.- Returns:
- the parameter name
-
hasNoneParameterAnnotation
public boolean hasNoneParameterAnnotation(Set<Class<? extends Annotation>> annotationTypes)
Has none parameter annotation.- Parameters:
annotationTypes
- the annotation types- Returns:
- the boolean
-
hasParameterAnnotation
public boolean hasParameterAnnotation(Class<? extends Annotation> annotationType)
Has parameter annotation.- Parameters:
annotationType
- the annotation type- Returns:
- the boolean
-
findParameterAnnotation
public <A extends Annotation> Optional<A> findParameterAnnotation(Class<A> annotationType)
Find parameter annotation.- Type Parameters:
A
- the type parameter- Parameters:
annotationType
- the annotation type- Returns:
- the optional
-
toMultiValueMap
public <E,A extends Annotation> org.springframework.util.MultiValueMap<String,E> toMultiValueMap(Class<A> annotationType, Function<A,String> keyExtractor, Function<Object,E> valueMapper)
To multi value map.- Type Parameters:
E
- the type parameterA
- the type parameter- Parameters:
annotationType
- the annotation typekeyExtractor
- the key extractorvalueMapper
- the value mapper- Returns:
- the multi value map
-
toString
public String toString()
- Overrides:
toString
in classInvocation
-
-