@Override
            public Boolean visitPrimitive(PrimitiveType type, Void p) {
                switch (type.getKind()) {
                    case BOOLEAN:
                        return clazz.equals(Boolean.TYPE);
                    case BYTE:
                        return clazz.equals(Byte.TYPE);
                    case CHAR:
                        return clazz.equals(Character.TYPE);
                    case DOUBLE:
                        return clazz.equals(Double.TYPE);
                    case FLOAT:
                        return clazz.equals(Float.TYPE);
                    case INT:
                        return clazz.equals(Integer.TYPE);
                    case LONG:
                        return clazz.equals(Long.TYPE);
                    case SHORT:
                        return clazz.equals(Short.TYPE);
                    default:
                        throw new IllegalArgumentException(type + " cannot be represented as a Class<?>.");
                }
            }
Utilities related to {@link TypeMirror} instances.

@author Gregory Kick
@since 2.0
android/annotation_processors/xposed_hook_compiler/src/main/java/github/tornaco/permission/compiler/common/MoreTypes.java