Class PageAnnotationHandler

java.lang.Object
com.mastfrog.acteur.preconditions.PageAnnotationHandler
Direct Known Subclasses:
BuiltInPageAnnotationHandler

public abstract class PageAnnotationHandler extends Object
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
  • Constructor Details

  • Method Details

    • processAnnotations

      public abstract <T extends Page> boolean processAnnotations(T page, List<? super Acteur> addTo)
    • types

      protected final Set<Class<? extends Annotation>> types()