public class

AnnotationMatchingPointcut

extends Object
implements Pointcut
java.lang.Object
   ↳ org.springframework.aop.support.annotation.AnnotationMatchingPointcut

Class Overview

Simple Pointcut that looks for a specific Java 5 annotation being present on a class or method.

Summary

[Expand]
Inherited Fields
From interface org.springframework.aop.Pointcut
Public Constructors
AnnotationMatchingPointcut(Class<? extends Annotation> classAnnotationType)
Create a new AnnotationMatchingPointcut for the given annotation type.
AnnotationMatchingPointcut(Class<? extends Annotation> classAnnotationType, boolean checkInherited)
Create a new AnnotationMatchingPointcut for the given annotation type.
AnnotationMatchingPointcut(Class<? extends Annotation> classAnnotationType, Class<? extends Annotation> methodAnnotationType)
Create a new AnnotationMatchingPointcut for the given annotation type.
Public Methods
static AnnotationMatchingPointcut forClassAnnotation(Class<? extends Annotation> annotationType)
Factory method for an AnnotationMatchingPointcut that matches for the specified annotation at the class level.
static AnnotationMatchingPointcut forMethodAnnotation(Class<? extends Annotation> annotationType)
Factory method for an AnnotationMatchingPointcut that matches for the specified annotation at the method level.
ClassFilter getClassFilter()
Return the ClassFilter for this pointcut.
MethodMatcher getMethodMatcher()
Return the MethodMatcher for this pointcut.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.aop.Pointcut

Public Constructors

public AnnotationMatchingPointcut (Class<? extends Annotation> classAnnotationType)

Create a new AnnotationMatchingPointcut for the given annotation type.

Parameters
classAnnotationType the annotation type to look for at the class level

public AnnotationMatchingPointcut (Class<? extends Annotation> classAnnotationType, boolean checkInherited)

Create a new AnnotationMatchingPointcut for the given annotation type.

Parameters
classAnnotationType the annotation type to look for at the class level
checkInherited whether to explicitly check the superclasses and interfaces for the annotation type as well (even if the annotation type is not marked as inherited itself)

public AnnotationMatchingPointcut (Class<? extends Annotation> classAnnotationType, Class<? extends Annotation> methodAnnotationType)

Create a new AnnotationMatchingPointcut for the given annotation type.

Parameters
classAnnotationType the annotation type to look for at the class level (can be null)
methodAnnotationType the annotation type to look for at the method level (can be null)

Public Methods

public static AnnotationMatchingPointcut forClassAnnotation (Class<? extends Annotation> annotationType)

Factory method for an AnnotationMatchingPointcut that matches for the specified annotation at the class level.

Parameters
annotationType the annotation type to look for at the class level
Returns
  • the corresponding AnnotationMatchingPointcut

public static AnnotationMatchingPointcut forMethodAnnotation (Class<? extends Annotation> annotationType)

Factory method for an AnnotationMatchingPointcut that matches for the specified annotation at the method level.

Parameters
annotationType the annotation type to look for at the method level
Returns
  • the corresponding AnnotationMatchingPointcut

public ClassFilter getClassFilter ()

Return the ClassFilter for this pointcut.

Returns
  • the ClassFilter (never null)

public MethodMatcher getMethodMatcher ()

Return the MethodMatcher for this pointcut.

Returns
  • the MethodMatcher (never null)