public class ReflectionPredicates
extends java.lang.Object
Predicate
object that involves
Reflection in general.Constructor and Description |
---|
ReflectionPredicates() |
Modifier and Type | Method and Description |
---|---|
static java.util.function.Predicate<java.lang.reflect.AnnotatedElement> |
annotated()
A predicate that returns
true if the element has annotations. |
static <T extends java.lang.reflect.AnnotatedElement> |
annotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType) |
static <T extends java.lang.reflect.Member> |
declaring(int... modifiers) |
static <T extends java.lang.reflect.Member> |
named(java.lang.String name) |
public static <T extends java.lang.reflect.AnnotatedElement> java.util.function.Predicate<T> annotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
true
if the evaluated element is
annotated with the specified Annotation.public static final java.util.function.Predicate<java.lang.reflect.AnnotatedElement> annotated()
true
if the element has annotations.public static <T extends java.lang.reflect.Member> java.util.function.Predicate<T> named(java.lang.String name)
true
if the evaluated element has a
name that with the given one.public static <T extends java.lang.reflect.Member> java.util.function.Predicate<T> declaring(int... modifiers)
true
if the evaluated element has the
specified modifiers.