public static boolean isTypeOf(final Class<?> clazz, TypeMirror type) {
    checkNotNull(clazz);
    return type.accept(new IsTypeOf(clazz), null);
  }
Returns true if the raw type underlying the given {@link TypeMirror} represents the same raw
type as the given {@link Class} and throws an IllegalArgumentException if the {@link
TypeMirror} does not represent a type that can be referenced by a {@link Class}
common/src/main/java/com/google/auto/common/MoreTypes.java