Annotation Interface AdaptWith


@Retention(RUNTIME) @Target({TYPE,FIELD,PARAMETER,METHOD,ANNOTATION_TYPE}) @Documented @Experimental("Allow you to map to and from another object. Not covered by the specification. Subject to change.") public @interface AdaptWith
Allow adapting objects using an Adapter class
This is an experimental feature that might move to the spec.
Example:
 public class Profile {
     //  Map a EmailAdress to an Address
     @AdaptWith(EmailAdapter.class)
     private Address email;

     // other getters/setters...
 }
 
Author:
Phillip Kruger (phillip.kruger@redhat.com)
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Class<? extends Adapter>