Annotation Interface Name


@Retention(RUNTIME) @Target({METHOD,TYPE}) public @interface Name
Defines the name of a configuration item.

Methods of interfaces extending Configuration can be annotated with this annotation in order to explicitly receive a name.

Methods that are not annotated with Name receive a default name based on its Java name. CamelCase is converted to lisp-case, so a method called serverHost() would receive the config name server-host.

If the method's name starts with get or is, then get or is is removed from the name. For example, getServerName() would become server-name, isValid() would become valid.

See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
     
  • Element Details

    • value

      String value
      Returns:
      the name of the configuration item.