Annotation Interface Reference


@Retention(RUNTIME) @Target({FIELD,METHOD,ANNOTATION_TYPE}) public @interface Reference
Meta-annotation to be used to annotate annotations that mark references to other objects.
Author:
Oliver Gierke, Jon Brisbin
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Explicitly define the target type of the reference.
    Explicitly define the target type of the reference.
  • Element Details

    • value

      @AliasFor(attribute="to") Class<?> value
      Explicitly define the target type of the reference. Used in case the annotated property is not the target type but rather an identifier and/or if that identifier type is not uniquely identifying the target entity.
      Returns:
      Default:
      java.lang.Class.class
    • to

      @AliasFor(attribute="value") Class<?> to
      Explicitly define the target type of the reference. Used in case the annotated property is not the target type but rather an identifier and/or if that identifier type is not uniquely identifying the target entity.
      Returns:
      Default:
      java.lang.Class.class