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)
| 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; |