Annotation Interface DisplayName


@Retention(RUNTIME) public @interface DisplayName
Declares a human-friendly display name for a class, specification, or capability.

The DisplayName annotation is intended for use in contexts where a concise, stable label is required for presentation or diagnostic purposes. Frameworks such as catalogs, serializers, or logging utilities may check for this annotation and use its value instead of relying on Class.getSimpleName().

Design considerations

  • Display names are not identifiers and must not be used for protocol negotiation or security-critical decisions.
  • The value should be concise, human-readable, and stable across versions where compatibility matters.
  • When absent, consumers typically fall back to Describable or class names.

Example

@DisplayName("AES-GCM 256-bit")
public final class AesSpec implements AlgorithmKeySpec {
    ...
}
Since:
1.0
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Returns the human-friendly display name.
  • Element Details

    • value

      String value
      Returns the human-friendly display name.
      Returns:
      a descriptive string, never null