public class TypePredicates
extends java.lang.Object
Predicate<Class<?>> predicate = inPackage("java.util").or(inPackage("com.sun"));
| Constructor and Description |
|---|
TypePredicates() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.function.Predicate<java.lang.Class<?>> |
hasModifiers(java.lang.Integer modifiers)
Create a predicate to check that a type has a given set of modifiers.
|
static java.util.function.Predicate<java.lang.Class<?>> |
inPackage(java.lang.String packageNamePrefix)
Create a predicate to check that a type is defined in a given package.
|
static java.util.function.Predicate<java.lang.Class<?>> |
isAbstract()
Create a predicate to check if a class is abstract.
|
static java.util.function.Predicate<java.lang.Class<?>> |
isAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation>... annotations)
Create a predicate to check that a type is annotated with one of the given annotations.
|
static java.util.function.Predicate<java.lang.Class<?>> |
isArray()
Create a predicate to check if a type is an array.
|
static java.util.function.Predicate<java.lang.Class<?>> |
isAssignableFrom(java.lang.Class<?> type)
Create a predicate to check if a type is is assignable from another type.
|
static java.util.function.Predicate<java.lang.Class<?>> |
isEnum()
Create a predicate to check if a type is an enumeration.
|
static java.util.function.Predicate<java.lang.Class<?>> |
isInterface()
Create a predicate to check if a type is an interface.
|
static java.util.function.Predicate<java.lang.Class<?>> |
isPrimitive()
Create a predicate to check if a type is primitive.
|
static java.util.function.Predicate<java.lang.Class<?>> |
named(java.lang.String name)
Create a predicate to check that a type has a given name.
|
static java.util.function.Predicate<java.lang.Class<?>> |
ofType(java.lang.Class<?> type)
Create a predicate to check that a class has a certain type.
|
public static java.util.function.Predicate<java.lang.Class<?>> named(java.lang.String name)
name - name on the typepublic static java.util.function.Predicate<java.lang.Class<?>> ofType(java.lang.Class<?> type)
type - of the class to checkpublic static java.util.function.Predicate<java.lang.Class<?>> inPackage(java.lang.String packageNamePrefix)
packageNamePrefix - prefix of the package namepublic static java.util.function.Predicate<java.lang.Class<?>> isAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation>... annotations)
annotations - present on the typepublic static java.util.function.Predicate<java.lang.Class<?>> isInterface()
public static java.util.function.Predicate<java.lang.Class<?>> isPrimitive()
public static java.util.function.Predicate<java.lang.Class<?>> isAbstract()
public static java.util.function.Predicate<java.lang.Class<?>> hasModifiers(java.lang.Integer modifiers)
modifiers - of the type to checkpublic static java.util.function.Predicate<java.lang.Class<?>> isEnum()
public static java.util.function.Predicate<java.lang.Class<?>> isArray()
public static java.util.function.Predicate<java.lang.Class<?>> isAssignableFrom(java.lang.Class<?> type)
Copyright © 2019. All Rights Reserved.