1 7 8 package javax.lang.model.type; 9 10 11 25 public enum TypeKind { 26 29 BOOLEAN, 30 31 34 BYTE, 35 36 39 SHORT, 40 41 44 INT, 45 46 49 LONG, 50 51 54 CHAR, 55 56 59 FLOAT, 60 61 64 DOUBLE, 65 66 70 VOID, 71 72 76 NONE, 77 78 81 NULL, 82 83 86 ARRAY, 87 88 91 DECLARED, 92 93 96 ERROR, 97 98 101 TYPEVAR, 102 103 106 WILDCARD, 107 108 112 PACKAGE, 113 114 117 EXECUTABLE, 118 119 123 OTHER; 124 125 130 public boolean isPrimitive() { 131 switch(this) { 132 case BOOLEAN: 133 case BYTE: 134 case SHORT: 135 case INT: 136 case LONG: 137 case CHAR: 138 case FLOAT: 139 case DOUBLE: 140 return true; 141 142 default: 143 return false; 144 } 145 } 146 } 147 | Popular Tags |