Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 public NoType getNoType(TypeKind kind) {
   switch (kind) {
     case VOID:
       return syms.voidType;
     case NONE:
       return Type.noType;
     default:
       throw new IllegalArgumentException(kind.toString());
   }
 }