Package react4j.annotations
Annotation Interface PreRender
Identifies a method that is called immediately prior to render method.
There may be 0 or more methods annotated with this annotation in a view.
This method will be invoked immediately prior to @Render annotated method. If there are multiple methods annotated by this annotation then the methods will be invoked in the order specified by the sortOrder parameter.
The method must also conform to the following constraints:
- Must not be annotated with any other react4j annotation
- Must have 0 parameters
- Must not return a value
- Must not be private
- Must not be public
- 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
SuppressWarnings
orSuppressReact4jWarnings
annotations 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
View
annotation as the method is not expected to be invoked outside the view. A warning will be generated but can be suppressed by theSuppressWarnings
orSuppressReact4jWarnings
annotations with a key "React4j:ProtectedMethod".
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionint
The parameter to determine the ordering of PreRender annotated methods if multiple methods are defined.
-
Element Details
-
sortOrder
int sortOrderThe parameter to determine the ordering of PreRender annotated methods if multiple methods are defined. Lower values occur earlier, if multiple methods have the same sortOrder then sorting order is undefined.- Returns:
- the sortOrder.
- Default:
- 2000
-