public static boolean isPrimitive(TypeMirror type){
switch (type.getKind()) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FLOAT:
case INT:
case LONG:
case SHORT:
    return true;
default :
  return false;
}
}

public static boolean isPrimitive ( TypeMirror type ) { switch ( type . getKind ( ) ) { case BOOLEAN : case BYTE : case CHAR : case DOUBLE : case FLOAT : case INT : case LONG : case SHORT : return true ; default : return false ; } }
returns true iff the argument is a primitive type .
