Annotation Type Messages

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean forProperties
      Returns whether message keys for all bean properties of the annotated type should be created.
      boolean forType
      Returns whether a message key for the annotated type should be created.
      boolean ignoreImplicit
      Returns whether the annotated element should be ignored for the implicit generation of message keys.
      String[] keys
      (Additional) Message keys.
      String prefix
      The prefix to be used for message keys.
      String[] value
      (Additional) Message keys.
    • Field Detail

      • PREFIX_SOURCE_TYPE

        static final String PREFIX_SOURCE_TYPE
    • Element Detail

      • forType

        boolean forType
        Returns whether a message key for the annotated type should be created. Only considered when the annotation is directly on the type.
        Returns:
        whether a message key for the annotated type should be created
        Default:
        false
      • forProperties

        boolean forProperties
        Returns whether message keys for all bean properties of the annotated type should be created. Only considered when the annotation is directly on the type.
        Returns:
        whether message keys for all bean properties of the annotated type should be created
        Default:
        false
      • ignoreImplicit

        boolean ignoreImplicit
        Returns whether the annotated element should be ignored for the implicit generation of message keys. E.g. properties (represented by the associated field or getter) and enum elements annotated with ignoreImplicit = true will be ignored. However, explicitly provided message keys on that element will still be processed!
        Returns:
        whether the annotated element should be ignored for the implicit generation of message keys
        Default:
        false
      • prefix

        String prefix
        The prefix to be used for message keys. The default is to use the fully qualified name of the source type followed by a period (.). The prefix should usually not be changed, but sometimes it may be necessary to declare very specific message keys. The prefix can only be set at the type level.
        Returns:
        prefix to be used for message keys
        Default:
        "__SOURCE_TYPE__"
      • value

        String[] value
        (Additional) Message keys. The provided strings will be used as local parts in the full message keys. This is an alias for keys().
        Returns:
        message keys
        Default:
        {}
      • keys

        String[] keys
        (Additional) Message keys. The provided strings will be used as local parts in the full message keys. This is an alias for value().
        Returns:
        message keys
        Default:
        {}