@Target(value=TYPE) @Retention(value=SOURCE) public @interface DecoratedWith
A typical decorator implementation will be an abstract class and only implement/override a subset of the methods of the mapper type which it decorates. All methods not implemented or overridden by the decorator will be implemented by the code generator.
If a constructor with a single parameter accepting the type of the decorated mapper is present, a delegate with generated implementations of all the mapper methods will be passed to this constructor. A typical implementation will store the passed delegate in a field of the decorator and make use of it in the decorator methods.
NOTE: The decorator feature is considered experimental and it may change in future releases. Currently decorators are only supported for the default component model, not for the CDI and Spring models.
public abstract Class<?> value
The decorator type must either have a default constructor or a constructor with a single parameter accepting the type of the decorated mapper.
Copyright © 2012–2015. All rights reserved.