Annotation Interface Element


@Retention(RUNTIME) @Target({FIELD,METHOD}) public @interface Element

Sets the Element for type conversion.

Annotation usage:

The Element annotation must be applied at field or method level.

Annotation parameters:

Parameter Required Default Description
value no java.lang.Object.class The element property value.

Example code:

 
 // The key property for User objects within the users collection is the userName attribute.
 @Element( value = com.acme.User )
 private Map<Long, User> userMap;

 @Element( value = com.acme.User )
 public List<User> userList;
 
 
Author:
Rainer Hermanns
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
     
  • Element Details

    • value

      Class value
      Returns:
      The Element value. Defaults to java.lang.Object.class.
      Default:
      java.lang.Object.class