jodd.proxetta.pointcuts.MethodAnnotationPointcut Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jodd-proxetta Show documentation
Show all versions of jodd-proxetta Show documentation
Jodd Proxetta is the fastest proxy creator with unique approach for defying pointcuts and advices.
// Copyright (c) 2003-2014, Jodd Team (jodd.org). All Rights Reserved.
package jodd.proxetta.pointcuts;
import jodd.proxetta.MethodInfo;
import java.lang.annotation.Annotation;
/**
* Pointcut on method with one of given annotations.
*/
public class MethodAnnotationPointcut extends ProxyPointcutSupport {
protected final Class extends Annotation>[] annotationClasses;
/**
* Defines set of annotations we are looking for.
*/
public MethodAnnotationPointcut(Class extends Annotation>... annotationClasses) {
this.annotationClasses = annotationClasses;
}
/**
* {@inheritDoc}
*/
public boolean apply(MethodInfo methodInfo) {
return hasAnnotation(methodInfo, annotationClasses);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy