Annotation Interface Transformer
@Repeatable(TransformerCollection.class)
@Retention(RUNTIME)
@Target({METHOD,TYPE})
public @interface Transformer
Annotation to mark methods or types that provide transformation functionality.
This annotation specifies various attributes including the parameter name, the transformer class,
and the caching behavior for the transformation operation.
Methods or types annotated with @Transformer are intended to facilitate the transformation
of input parameters into desired output types. This can be particularly useful in scenarios where
data needs to be converted between different formats or representations.
- Since:
- 3.0.2-SNAPSHOT
- See Also:
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionSpecifies the name of the parameter to be transformed.Class<? extends Transformable<?,?>> Specifies the class of the transformer that performs the transformation. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanSpecifies whether caching is enabled for the transformation.
-
Element Details
-
parameter
String parameterSpecifies the name of the parameter to be transformed.- Returns:
- The name of the parameter.
-
transformer
Class<? extends Transformable<?,?>> transformerSpecifies the class of the transformer that performs the transformation. The transformer class must implement theTransformableinterface.- Returns:
- The class of the transformer.
-
-
-
cacheable
boolean cacheableSpecifies whether caching is enabled for the transformation. If set totrue, the transformation result may be cached for subsequent invocations.- Returns:
- True if caching is enabled, false otherwise.
- Default:
- true
-