src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java

changeset 713
ea92d1e275b6
parent 554
9d9f26857129
child 798
4868a36f6fd8
equal deleted inserted replaced
712:a1d31ab7b525 713:ea92d1e275b6
248 248
249 249
250 /** 250 /**
251 * Sets "value" to an ExceptionProxy indicating a type mismatch. 251 * Sets "value" to an ExceptionProxy indicating a type mismatch.
252 */ 252 */
253 private void typeMismatch(final Method method, final Attribute attr) { 253 private void typeMismatch(Method method, final Attribute attr) {
254 value = new ExceptionProxy() { 254 class AnnotationTypeMismatchExceptionProxy extends ExceptionProxy {
255 private static final long serialVersionUID = 8473323277815075163L; 255 private static final long serialVersionUID = 8473323277815075163L;
256 transient final Method method;
257 AnnotationTypeMismatchExceptionProxy(Method method) {
258 this.method = method;
259 }
256 public String toString() { 260 public String toString() {
257 return "<error>"; // eg: @Anno(value=<error>) 261 return "<error>"; // eg: @Anno(value=<error>)
258 } 262 }
259 protected RuntimeException generateException() { 263 protected RuntimeException generateException() {
260 return new AnnotationTypeMismatchException(method, 264 return new AnnotationTypeMismatchException(method,
261 attr.type.toString()); 265 attr.type.toString());
262 } 266 }
263 }; 267 }
268 value = new AnnotationTypeMismatchExceptionProxy(method);
264 } 269 }
265 } 270 }
266 271
267 272
268 /** 273 /**

mercurial