Class AnnotationHandler
java.lang.Object
org.apache.shiro.aop.AnnotationHandler
- Direct Known Subclasses:
AuthorizingAnnotationHandler
Base support class for implementations that reads and processes JSR-175 annotations.
- Since:
- 0.9.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Class<? extends Annotation> The type of annotation this handler will process. -
Constructor Summary
ConstructorsConstructorDescriptionAnnotationHandler(Class<? extends Annotation> annotationClass) Constructs anAnnotationHandlerwho processes annotations of the specified type. -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends Annotation> Returns the type of annotation this handler inspects and processes.protected SubjectReturns theSubjectassociated with the currently-executing code.protected voidsetAnnotationClass(Class<? extends Annotation> annotationClass) Sets the type of annotation this handler will inspect and process.
-
Field Details
-
annotationClass
The type of annotation this handler will process.
-
-
Constructor Details
-
AnnotationHandler
Constructs anAnnotationHandlerwho processes annotations of the specified type. Immediately callssetAnnotationClass(Class).- Parameters:
annotationClass- the type of annotation this handler will process.
-
-
Method Details
-
getSubject
Returns theSubjectassociated with the currently-executing code. This default implementation merely calls.SecurityUtils.getSubject()- Returns:
- the
Subjectassociated with the currently-executing code.
-
setAnnotationClass
protected void setAnnotationClass(Class<? extends Annotation> annotationClass) throws IllegalArgumentException Sets the type of annotation this handler will inspect and process.- Parameters:
annotationClass- the type of annotation this handler will process.- Throws:
IllegalArgumentException- if the argument isnull.
-
getAnnotationClass
Returns the type of annotation this handler inspects and processes.- Returns:
- the type of annotation this handler inspects and processes.
-