137 if (t.getKind() != TypeKind.DECLARED) |
137 if (t.getKind() != TypeKind.DECLARED) |
138 throw new IllegalArgumentException(t.toString()); |
138 throw new IllegalArgumentException(t.toString()); |
139 Type unboxed = types.unboxedType((Type) t); |
139 Type unboxed = types.unboxedType((Type) t); |
140 if (! unboxed.isPrimitive()) // only true primitives, not void |
140 if (! unboxed.isPrimitive()) // only true primitives, not void |
141 throw new IllegalArgumentException(t.toString()); |
141 throw new IllegalArgumentException(t.toString()); |
142 return unboxed; |
142 return (PrimitiveType)unboxed; |
143 } |
143 } |
144 |
144 |
145 public TypeMirror capture(TypeMirror t) { |
145 public TypeMirror capture(TypeMirror t) { |
146 validateTypeNotIn(t, EXEC_OR_PKG); |
146 validateTypeNotIn(t, EXEC_OR_PKG); |
147 return types.capture((Type) t); |
147 return types.capture((Type) t); |