Annotation Interface Parameters


@Documented @Target(FIELD) @Retention(RUNTIME) public @interface Parameters
Annotation to add parameters to an enum constant that implements LocalizationKey.

WARNING: This annotation can only be applied to enum constants! Using this on another static field, i.E. with LocalizationKey.of(String) will throw an IllegalArgumentException.

Example:

 enum Keys implements LocalizationKey {
    @Parameters({"user", "attempts"})
     WARN_LOGIN_ATTEMPTS,
    @Parameters({"username"})
     USER_NOT_FOUND,
 }
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The parameters associated with the localization key.
  • Element Details

    • value

      String[] value
      The parameters associated with the localization key.

      These parameters can be used in the localization message to replace placeholders.

      See: Localization.get(LocalizationKey, Object...)

      Returns:
      an array of parameter names
      Default:
      {}