Annotation Interface PropertyName


@ClassVersion(sourceVersion="$Id: PropertyName.java 885 2021-03-23 19:33:53Z tquadrat $") @Documented @Retention(CLASS) @Target(METHOD) @API(status=STABLE, since="0.1.0") public @interface PropertyName

Associates a property name to a method.

For a JavaBean, the name of the respective property is usually derived from the name of the method; so for the method getValue(), the name of the property is "value", and for setString(), it would be "string".

But sometimes this is not wanted or not possible.

In these cases, the accessor and/or mutator methods for that property can be annotated with this annotation to get an arbitrary name.

Notes:
  • The annotation is used by several annotation processors, but this module itself does not provide any means to interpret or validate this annotation.
  • The value has to be a valid Java identifier.
Author:
Thomas Thrien (thomas.thrien@tquadrat.org)
Version:
$Id: PropertyName.java 885 2021-03-23 19:33:53Z tquadrat $
Since:
0.1.0
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The name for the property.
  • Element Details

    • value

      The name for the property.
      Note:
      • The value has to be a valid Java identifier.
      Returns:
      The name for the property.