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

Method isTypeOf

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

Returns true if the raw type underlying the given TypeMirror represents the same raw type as the given Class and throws an IllegalArgumentException if the TypeMirror does not represent a type that can be referenced by a Class

(final Class<?> clazz, TypeMirror type)

Source from the content-addressed store, hash-verified

841 * TypeMirror} does not represent a type that can be referenced by a {@link Class}
842 */
843 public static boolean isTypeOf(final Class<?> clazz, TypeMirror type) {
844 checkNotNull(clazz);
845 return type.accept(new IsTypeOf(clazz), null);
846 }
847
848 private static final class IsTypeOf extends SimpleTypeVisitor8<Boolean, Void> {
849 private final Class<?> clazz;

Callers 15

testIsTypeOfMethod · 0.95
isTypeOf_arrayTypeMethod · 0.95
isTypeOf_declaredTypeMethod · 0.95
isTypeOf_failMethod · 0.95
defaultActionMethod · 0.95
visitBooleanMethod · 0.95
visitByteMethod · 0.95
visitCharMethod · 0.95
visitDoubleMethod · 0.95
visitFloatMethod · 0.95

Calls 2

checkNotNullMethod · 0.45
acceptMethod · 0.45

Tested by 6

testIsTypeOfMethod · 0.76
isTypeOf_arrayTypeMethod · 0.76
isTypeOf_declaredTypeMethod · 0.76
isTypeOf_failMethod · 0.76