@FunctionalInterface public interface AnnotationFilter
| Modifier and Type | Field and Description |
|---|---|
static AnnotationFilter |
JAVA
|
static AnnotationFilter |
NONE
AnnotationFilter that never matches and can be used when no
filtering is needed. |
static AnnotationFilter |
PLAIN
AnnotationFilter that matches annotations in the
java.lang.* and org.springframework.lang.* packages. |
| Modifier and Type | Method and Description |
|---|---|
default boolean |
matches(Annotation annotation)
Test if the given annotation matches the filter.
|
default boolean |
matches(Class<?> type)
Test if the given type matches the filter.
|
boolean |
matches(String typeName)
Test if the given type name matches the filter.
|
static AnnotationFilter |
packages(String... packages)
Create a new
AnnotationFilter that matches annotations in the
specified packages. |
static final AnnotationFilter PLAIN
AnnotationFilter that matches annotations in the
java.lang.* and org.springframework.lang.* packages.static final AnnotationFilter JAVA
static final AnnotationFilter NONE
AnnotationFilter that never matches and can be used when no
filtering is needed.default boolean matches(Annotation annotation)
annotation - the annotation to testtrue if the annotation matchesdefault boolean matches(Class<?> type)
type - the annotation type to testtrue if the annotation matchesboolean matches(String typeName)
typeName - the fully qualified class name of the annotation type to testtrue if the annotation matchesstatic AnnotationFilter packages(String... packages)
AnnotationFilter that matches annotations in the
specified packages.packages - the annotation packages that should matchAnnotationFilter instance