The Spring Framework

org.springframework.aop.support.annotation
Class AnnotationMatchingPointcut

java.lang.Object
  extended by org.springframework.aop.support.annotation.AnnotationMatchingPointcut
All Implemented Interfaces:
Pointcut

public class AnnotationMatchingPointcut
extends Object
implements Pointcut

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

Since:
2.0
Author:
Juergen Hoeller
See Also:
AnnotationClassFilter

Field Summary
 
Fields inherited from interface org.springframework.aop.Pointcut
TRUE
 
Constructor Summary
AnnotationMatchingPointcut(Class<? extends Annotation> classAnnotationType)
          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.
 
Method Summary
 ClassFilter getClassFilter()
          Return the ClassFilter for this pointcut.
 MethodMatcher getMethodMatcher()
          Return the MethodMatcher for this pointcut.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationMatchingPointcut

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

AnnotationMatchingPointcut

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)
Method Detail

getClassFilter

public ClassFilter getClassFilter()
Description copied from interface: Pointcut
Return the ClassFilter for this pointcut.

Specified by:
getClassFilter in interface Pointcut

getMethodMatcher

public MethodMatcher getMethodMatcher()
Description copied from interface: Pointcut
Return the MethodMatcher for this pointcut.

Specified by:
getMethodMatcher in interface Pointcut

The Spring Framework

Copyright © 2002-2006 The Spring Framework.