Package react4j.annotations
Annotation Interface Render
Identifies the method invoked to render the view.
There must be exactly one method annotated with this annotation within the view.
The method must return a value of type
ReactNode.
The method must also conform to the following constraints:
- Must not be annotated with any other react4j annotation
- Must not be private
- Must not be static
- Must not be abstract
- Must not throw exceptions
- Must be accessible from the same package as the class annotated by
View -
Should not be public as not expected to be invoked outside the view. A warning will be generated but can
be suppressed by the
SuppressWarningsorSuppressReact4jWarningsannotations with a key "React4j:PublicMethod". 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
Viewannotation as the method is not expected to be invoked outside the view. A warning will be generated but can be suppressed by theSuppressWarningsorSuppressReact4jWarningsannotations with a key "React4j:ProtectedMethod". -
Should be annotated with either
NonnullorNullable. If neither annoation is present then a warning will be generated but can be suppressed by theSuppressWarningsorSuppressReact4jWarningsannotations with a key "React4j:MissingRenderNullability".