Package org.apache.shiro.aop
Class AnnotationHandler
-
- org.apache.shiro.aop.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.
-
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 theSubject
associated with the currently-executing code.protected void
<? extends > annotationClass)
Sets the type of annotation this handler will inspect and process.
-
-
-
Constructor Detail
-
AnnotationHandler
public AnnotationHandler(<? extends > annotationClass)
Constructs anAnnotationHandler
who processes annotations of the specified type. Immediately callssetAnnotationClass(Class)
.- Parameters:
annotationClass
- the type of annotation this handler will process.
-
-
Method Detail
-
getSubject
protected Subject getSubject()
Returns theSubject
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.
-
-