Class AnnotationHandler

  • Direct Known Subclasses:
    AuthorizingAnnotationHandler

    public abstract class AnnotationHandler
    extends 
    Base support class for implementations that reads and processes JSR-175 annotations.
    Since:
    0.9.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected <? extends > annotationClass
      The type of annotation this handler will process.
    • Constructor Summary

      Constructors 
      Constructor Description
      <? extends > annotationClass)
      Constructs an AnnotationHandler who processes annotations of the specified type.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <? extends > getAnnotationClass()
      Returns the type of annotation this handler inspects and processes.
      protected Subject getSubject()
      Returns the Subject associated with the currently-executing code.
      protected void <? extends > annotationClass)
      Sets the type of annotation this handler will inspect and process.
      • Methods inherited from class java.lang.

        , , , , , , , , , ,
    • Field Detail

      • annotationClass

        protected <? extends > annotationClass
        The type of annotation this handler will process.
    • Constructor Detail

      • AnnotationHandler

        public AnnotationHandler​(<? extends > annotationClass)
        Constructs an AnnotationHandler who processes annotations of the specified type. Immediately calls setAnnotationClass(Class).
        Parameters:
        annotationClass - the type of annotation this handler will process.
    • Method Detail

      • getSubject

        protected Subject getSubject()
        Returns the Subject associated with the currently-executing code.

        This default implementation merely calls SecurityUtils.getSubject().

        Returns:
        the Subject associated with the currently-executing code.
      • setAnnotationClass

        protected void setAnnotationClass​(<? extends > annotationClass)
                                   throws 
        Sets the type of annotation this handler will inspect and process.
        Parameters:
        annotationClass - the type of annotation this handler will process.
        Throws:
        - if the argument is null.
      • getAnnotationClass

        public <? extends > getAnnotationClass()
        Returns the type of annotation this handler inspects and processes.
        Returns:
        the type of annotation this handler inspects and processes.