langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java
equal
deleted
inserted
replaced
215 runtimeType = runtimeTypeSaved; |
215 runtimeType = runtimeTypeSaved; |
216 } |
216 } |
217 } |
217 } |
218 } |
218 } |
219 |
219 |
220 @SuppressWarnings("unchecked") |
220 @SuppressWarnings({"unchecked", "rawtypes"}) |
221 public void visitEnum(Attribute.Enum e) { |
221 public void visitEnum(Attribute.Enum e) { |
222 if (runtimeType.isEnum()) { |
222 if (runtimeType.isEnum()) { |
223 String constName = e.value.toString(); |
223 String constName = e.value.toString(); |
224 try { |
224 try { |
225 value = Enum.valueOf((Class)runtimeType, constName); |
225 value = Enum.valueOf((Class)runtimeType, constName); |
226 } catch (IllegalArgumentException ex) { |
226 } catch (IllegalArgumentException ex) { |
227 value = new EnumConstantNotPresentExceptionProxy( |
227 value = new EnumConstantNotPresentExceptionProxy( |
228 (Class)runtimeType, constName); |
228 (Class<Enum<?>>)runtimeType, constName); |
229 } |
229 } |
230 } else { |
230 } else { |
231 value = null; // indicates a type mismatch |
231 value = null; // indicates a type mismatch |
232 } |
232 } |
233 } |
233 } |