Package arez.annotations
Annotation Interface ComponentNameRef
Annotate the method that will be overridden to provide the "name" of the Arez component.
This is useful when the user wants to manually create Arez elements (i.e.
ObservableValue
instances,
Observer
instances or ComputableValue
instances etc) and wants to use the same naming
convention as the generated Arez subclass.
The method that is annotated with the annotation must comply with the additional constraints:
- Must not be annotated with any other arez annotation
- Must have 0 parameters
- Must return a String
- Must be abstract
- Must not throw exceptions
- Must be accessible to the class annotated by the
ArezComponent
annotation. -
Should not be public as not expected to be invoked outside the component. A warning will be generated but can
be suppressed by the
SuppressWarnings
orSuppressArezWarnings
annotations with a key "Arez:PublicRefMethod". This warning is also suppressed by the annotation processor if it is implementing an interface method. -
Should not be protected if in the class annotated with the
ArezComponent
annotation as the method is not expected to be invoked outside the component. A warning will be generated but can be suppressed by theSuppressWarnings
orSuppressArezWarnings
annotations with a key "Arez:ProtectedMethod".
- See Also: