Class TypePredicates
java.lang.Object
com.google.errorprone.predicates.TypePredicates
A collection of
TypePredicates.-
Method Summary
Modifier and TypeMethodDescriptionstatic TypePredicateallOf(TypePredicate... predicates) static TypePredicateanyOf(com.google.common.collect.ImmutableList<TypePredicate> predicates) static TypePredicateanyOf(TypePredicate... predicates) static TypePredicateanything()Matches everything (alwaystrue).static TypePredicateisArray()Match arrays.static TypePredicateisArrayOf(TypePredicate predicate) static TypePredicateisDescendantOf(Supplier<com.sun.tools.javac.code.Type> type) Match sub-types of the given type.static TypePredicateisDescendantOf(String type) Match sub-types of the given type.static TypePredicateisDescendantOfAny(com.google.common.collect.ImmutableList<Supplier<com.sun.tools.javac.code.Type>> types) static TypePredicateisDescendantOfAny(Iterable<String> types) Match types that are a sub-type of one of the given types.static TypePredicateisExactType(Supplier<com.sun.tools.javac.code.Type> type) Match types that are exactly equal.static TypePredicateisExactType(String type) Match types that are exactly equal.static TypePredicateisExactTypeAny(Iterable<String> types) Match types that are exactly equal to any of the given types.static TypePredicatestatic TypePredicatenot(TypePredicate predicate) static TypePredicatenothing()Matches nothing (alwaysfalse).
-
Method Details
-
nothing
Matches nothing (alwaysfalse). -
anything
Matches everything (alwaystrue). -
isArray
Match arrays. -
isArrayOf
-
isPrimitive
-
isExactType
Match types that are exactly equal. -
isExactType
Match types that are exactly equal. -
isExactTypeAny
Match types that are exactly equal to any of the given types. -
isDescendantOf
Match sub-types of the given type. -
isDescendantOf
Match sub-types of the given type. -
isDescendantOfAny
Match types that are a sub-type of one of the given types. -
isDescendantOfAny
public static TypePredicate isDescendantOfAny(com.google.common.collect.ImmutableList<Supplier<com.sun.tools.javac.code.Type>> types) -
allOf
-
anyOf
-
anyOf
public static TypePredicate anyOf(com.google.common.collect.ImmutableList<TypePredicate> predicates) -
not
-