private boolean isPrimitiveWrapper(TypeMirror type) { Types types = context.getEnvironment().getTypeUtils(); for (TypeKind kind : TypeKind.values()) { if (!kind.isPrimitive()) { continue; } if (ElementUtils.typeEquals(type, types.boxedClass(types.getPrimitiveType(kind)).asType())) { return true; } } return false; }
public NoType getNoType(TypeKind kind) { switch (kind) { case VOID: return syms.voidType; case NONE: return Type.noType; default: throw new IllegalArgumentException(kind.toString()); } }