Esempio 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;
 }
Esempio 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());
   }
 }