All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jodd.proxetta.pointcuts.MethodAnnotationPointcut Maven / Gradle / Ivy

Go to download

Jodd Proxetta is the fastest proxy creator with unique approach for defying pointcuts and advices.

There is a newer version: 6.0.1
Show newest version
// 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[] annotationClasses;

	/**
	 * Defines set of annotations we are looking for.
	 */
	public MethodAnnotationPointcut(Class... annotationClasses) {
		this.annotationClasses = annotationClasses;
	}

	/**
	 * {@inheritDoc}
	 */
	public boolean apply(MethodInfo methodInfo) {
		return hasAnnotation(methodInfo, annotationClasses);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy