Interface ParameterExtensionEnricher
public interface ParameterExtensionEnricher
Allow to build extensions of an object parameter.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Map<Type,Collection<Annotation>> This method enables to add implicit annotations and therefore metadata on parameters based on types.onParameterAnnotation(String parameterName, Type parameterType, Annotation annotation) Visit all annotations of an object parameter and return for each annotation the related extensions.
-
Method Details
-
onParameterAnnotation
Map<String,String> onParameterAnnotation(String parameterName, Type parameterType, Annotation annotation) Visit all annotations of an object parameter and return for each annotation the related extensions. Note it is highly recommended even if not enforced to use a prefix by extension type.- Parameters:
parameterName- the name of the parameter currently visited.parameterType- the type of the parameter currently visited.annotation- the currently visited annotation.- Returns:
- the extensions to add for this parameter.
-
getImplicitAnnotationForTypes
This method enables to add implicit annotations and therefore metadata on parameters based on types. Note: this method is called only once before any processing and not for each parameter.- Returns:
- a mapping for types. In other words it enables to add an annotation on a type even if not explicit.
-