This annotation is used to declare message keys on types, fields or methods and can also be used
as a meta-annotation.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanReturns whether message keys for all bean properties of the annotated type should be created.booleanReturns whether a message key for the annotated type should be created.booleanReturns whether the annotated element should be ignored for the implicit generation of message keys.String[](Additional) Message keys.The prefix to be used for message keys.String[](Additional) Message keys. -
Field Summary
Fields
-
Field Details
-
PREFIX_SOURCE_TYPE
- See Also:
-
-
Element Details
-
forType
boolean forTypeReturns 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 forPropertiesReturns 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 ignoreImplicitReturns whether the annotated element should be ignored for the implicit generation of message keys. E.g. properties (represented by the associated getter) and enum elements annotated withignoreImplicit = truewill 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 prefixThe 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 forkeys().- 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 forvalue().- Returns:
- message keys
- Default:
- {}
-