Annotation Interface Attribute


@Retention(RUNTIME) @Target(METHOD) public @interface Attribute
Annotates a method of a view interface, including the name of the attribute.
Author:
Kevin Goeser
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Type specialisation.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Returns the name of the attribute.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Returns the default value of an optional attribute.
    Returns the description of the attribute.
     
    boolean
    Returns true, if the field is translatable (only valid for strings).
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Constant expressing that no default value is provided.
  • Field Details

    • ATTRIBUTE_NO_DEFAULT_VALUE

      static final String ATTRIBUTE_NO_DEFAULT_VALUE
      Constant expressing that no default value is provided.
      See Also:
  • Element Details

    • name

      String name
      Returns the name of the attribute.
      Returns:
      The name of the attribute.
    • label

      String label
      Returns:
      A label, e.g. for the UI formatted name.
      Default:
      "ATTRIBUTE_NO_DEFAULT_VALUE"
    • description

      String description
      Returns the description of the attribute.
      Returns:
      The description of the attribute.
      Default:
      ""
    • type

      Returns:
      A type specialisation.
      Default:
      DEFAULT
    • defaultValue

      String defaultValue
      Returns the default value of an optional attribute.
      Returns:
      The default value of an optional attribute.
      Default:
      "ATTRIBUTE_NO_DEFAULT_VALUE"
    • localised

      boolean localised
      Returns true, if the field is translatable (only valid for strings).
      Returns:
      True, if the field is translatable (only valid for strings).
      Default:
      false