Annotation Interface ReferenceId


This annotation designates the method used to retrieve the id of the reference. It can be placed on the getter of an Observable property or on a normal getter method if the id is never expected to change. See the Reference docs for how the method is used.

The method must also conform to the following constraints:

  • Must not be annotated with any arez annotations other than @Observable
  • Must have 0 parameters
  • Must return a value
  • Must not be private
  • Must not be static
  • Must not throw exceptions
  • Must be accessible to the class annotated by the ArezComponent annotation.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Return the name of the reference relative to the component.
  • Element Details

    • name

      @Nonnull String name
      Return the name of the reference relative to the component. The value must conform to the requirements of a java identifier. If not specified, the name will be derived by assuming the naming convention "get[Name]Id" or "[name]Id" otherwise a compile failure will generated.
      Returns:
      the name of the reference relative to the component.
      Default:
      "<default>"