Package org.proxy4j.core.filter
Class AnnotationFilter<T extends Annotation>
- java.lang.Object
-
- org.proxy4j.core.filter.AnnotationFilter<T>
-
- All Implemented Interfaces:
MethodFilter
public class AnnotationFilter<T extends Annotation> extends Object implements MethodFilter
An implementation of
MethodFilterthat selects methods marked with a given annotation.- Author:
- Brennan Spies
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(Method method)Accepts the method if it has an annotation of typeT.static <A extends Annotation>
AnnotationFilter<A>forAnnotation(Class<A> annotation)
-
-
-
Method Detail
-
forAnnotation
public static <A extends Annotation> AnnotationFilter<A> forAnnotation(Class<A> annotation)
-
accept
public boolean accept(Method method)
Accepts the method if it has an annotation of typeT.- Specified by:
acceptin interfaceMethodFilter- Parameters:
method- The method to test- Returns:
- True if method has annotation
-
-