langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/Constants.java
changeset 1789 7ac8c0815000
parent 10 06bc494ca11e
child 3378 22011d9a9398
equal deleted inserted replaced
1788:ced0a1a7ec80 1789:7ac8c0815000
   128                 append((TypeMirrorImpl) val);
   128                 append((TypeMirrorImpl) val);
   129             } else if (val instanceof EnumConstantDeclaration) {
   129             } else if (val instanceof EnumConstantDeclaration) {
   130                 append((EnumConstantDeclarationImpl) val);
   130                 append((EnumConstantDeclarationImpl) val);
   131             } else if (val instanceof AnnotationMirror) {
   131             } else if (val instanceof AnnotationMirror) {
   132                 append((AnnotationMirrorImpl) val);
   132                 append((AnnotationMirrorImpl) val);
   133             } else if (val instanceof Collection) {
   133             } else if (val instanceof Collection<?>) {
   134                 append((Collection) val);
   134                 append((Collection<?>) val);
   135             } else {
   135             } else {
   136                 appendUnquoted(val.toString());
   136                 appendUnquoted(val.toString());
   137             }
   137             }
   138         }
   138         }
   139 
   139 
   232         /**
   232         /**
   233          * Appends the elements of a collection, enclosed within braces
   233          * Appends the elements of a collection, enclosed within braces
   234          * and separated by ", ".  Useful for array-valued annotation
   234          * and separated by ", ".  Useful for array-valued annotation
   235          * elements.
   235          * elements.
   236          */
   236          */
   237         void append(Collection vals) {
   237         void append(Collection<?> vals) {
   238             buf.append('{');
   238             buf.append('{');
   239             boolean first = true;
   239             boolean first = true;
   240             for (Object val : vals) {
   240             for (Object val : vals) {
   241                 if (first) {
   241                 if (first) {
   242                     first = false;
   242                     first = false;