MCPcopy Create free account
hub / github.com/google/auto / isType

Method isType

common/src/main/java/com/google/auto/common/MoreTypes.java:805–807  ·  view source on GitHub ↗

Returns true if the raw type underlying the given TypeMirror represents a type that can be referenced by a Class. If this returns true, then #isTypeOf is guaranteed to not throw.

(TypeMirror type)

Source from the content-addressed store, hash-verified

803 * not throw.
804 */
805 public static boolean isType(TypeMirror type) {
806 return type.accept(IsTypeVisitor.INSTANCE, null);
807 }
808
809 private static final class IsTypeVisitor extends SimpleTypeVisitor8<Boolean, Void> {
810 private static final IsTypeVisitor INSTANCE = new IsTypeVisitor();

Callers 5

isTypeOf_declaredTypeMethod · 0.95
isTypeOf_failMethod · 0.95
nonObjectSuperclassMethod · 0.95
findAnnotatedElementsMethod · 0.45
getEnclosingTypeMethod · 0.45

Calls 1

acceptMethod · 0.45

Tested by 2

isTypeOf_declaredTypeMethod · 0.76
isTypeOf_failMethod · 0.76