Class PageAnnotationHandler
java.lang.Object
com.mastfrog.acteur.preconditions.PageAnnotationHandler
- Direct Known Subclasses:
BuiltInPageAnnotationHandler
Mechanism for pluggable handling of annotations - this way an application can
create its own annotations which imply that some acteurs are to be added to a
page, and actually add them.
To use, implement your PageAnnotationHandler, and bind it as an eager singleton so it is instantiated and registered on startup.
Note: If you need to guarantee your handlers run *after* the built in ones (for example, your code assumes authentication has already happened and a User object is available for injectio), annotate your implementation with &064;Ordered with a value greater than 0.
- Author:
- Tim Boudreau
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classRegistry of PageAnnotationHandlers -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPageAnnotationHandler(PageAnnotationHandler.Registry registry, Class<?>... annotationTypes) -
Method Summary
Modifier and TypeMethodDescriptionabstract <T extends Page>
booleanprocessAnnotations(T page, List<? super Acteur> addTo) protected final Set<Class<? extends Annotation>>types()
-
Constructor Details
-
PageAnnotationHandler
protected PageAnnotationHandler(PageAnnotationHandler.Registry registry, Class<?>... annotationTypes)
-
-
Method Details
-
processAnnotations
-
types
-