Annotation Interface Ref.Subscribe

Enclosing class:
Ref<T>

@Retention(RUNTIME) @Target(FIELD) public static @interface Ref.Subscribe
Annotation to be used on a Ref field to bind its values to the values of the published Ref in the direct parent container. A name can be set to differentiate between published Refs of the same type. If a name is not given, a value representing the type is used.

Named subscriptions currently only support Refs of the exact type, even if the Ref type is theoretically compatible.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Name to subscribe the Ref to.
  • Element Details

    • name

      String name
      Name to subscribe the Ref to. An empty or blank name means the Ref will be subscribed under a name generated from its type. The default value is an empty String.
      Returns:
      name to subscribe to
      Default:
      ""