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 TypePredicatehasAnnotation(ClassName annotationType) Match types that are annotated with the given annotation.static TypePredicatehasAnnotation(String annotationType) Match types that are annotated with the given annotation.static TypePredicateisArray()Match arrays.static TypePredicateisArrayOf(TypePredicate predicate) static TypePredicateisDescendantOf(ClassName type) Match sub-types of the given type.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(ClassName... types) Match types that are a sub-type of one of the given types.static TypePredicateisDescendantOfAny(Iterable<String> types) Match types that are a sub-type of one of the given types.static TypePredicateisDescendantOfAnyOf(Iterable<ClassName> types) Match types that are a sub-type of one of the given classes.static TypePredicateisExactType(ClassName type) Match types that are exactly equal.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(ClassName... types) Match types that are exactly equal to any of the given types.static TypePredicateisExactTypeAny(Iterable<String> types) Match types that are exactly equal to any of the given types.static TypePredicateisExactTypeAnyOf(Iterable<ClassName> types) Match types that are exactly equal to any of the given classes.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
-
hasAnnotation
Match types that are annotated with the given annotation. -
hasAnnotation
Match types that are annotated with the given annotation. -
isExactType
Match types that are exactly equal. -
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. -
isExactTypeAny
Match types that are exactly equal to any of the given types. -
isExactTypeAnyOf
Match types that are exactly equal to any of the given classes. -
isDescendantOf
Match sub-types of the given type. -
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
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) -
isDescendantOfAnyOf
Match types that are a sub-type of one of the given classes. -
allOf
-
anyOf
-
anyOf
public static TypePredicate anyOf(com.google.common.collect.ImmutableList<TypePredicate> predicates) -
not
-