langtools/src/share/classes/com/sun/tools/javadoc/SerializedForm.java
changeset 22159 682da512ec17
parent 14357 faf9cde2817b
child 22163 3651128c74eb
equal deleted inserted replaced
22158:dca1b80ed62c 22159:682da512ec17
   232      */
   232      */
   233     private void mapSerialFieldTagImplsToFieldDocImpls(FieldDocImpl spfDoc,
   233     private void mapSerialFieldTagImplsToFieldDocImpls(FieldDocImpl spfDoc,
   234                                                        DocEnv env,
   234                                                        DocEnv env,
   235                                                        ClassSymbol def) {
   235                                                        ClassSymbol def) {
   236         Names names = def.name.table.names;
   236         Names names = def.name.table.names;
   237 
   237         for (SerialFieldTag tag : spfDoc.serialFieldTags()) {
   238         SerialFieldTag[] sfTag = spfDoc.serialFieldTags();
   238             if (tag.fieldName() == null || tag.fieldType() == null) // ignore malformed @serialField tags
   239         for (int i = 0; i < sfTag.length; i++) {
       
   240             if (sfTag[i].fieldName() == null || sfTag[i].fieldType() == null) // ignore malformed @serialField tags
       
   241                 continue;
   239                 continue;
   242 
   240 
   243             Name fieldName = names.fromString(sfTag[i].fieldName());
   241             Name fieldName = names.fromString(tag.fieldName());
   244 
   242 
   245             // Look for a FieldDocImpl that is documented by serialFieldTagImpl.
   243             // Look for a FieldDocImpl that is documented by serialFieldTagImpl.
   246             for (Scope.Entry e = def.members().lookup(fieldName); e.scope != null; e = e.next()) {
   244             for (Scope.Entry e = def.members().lookup(fieldName);
       
   245                  e.scope != null; e = e.next()) {
   247                 if (e.sym.kind == Kinds.VAR) {
   246                 if (e.sym.kind == Kinds.VAR) {
   248                     VarSymbol f = (VarSymbol)e.sym;
   247                     VarSymbol f = (VarSymbol) e.sym;
   249                     FieldDocImpl fdi = env.getFieldDoc(f);
   248                     FieldDocImpl fdi = env.getFieldDoc(f);
   250                     ((SerialFieldTagImpl)(sfTag[i])).mapToFieldDocImpl(fdi);
   249                     ((SerialFieldTagImpl) (tag)).mapToFieldDocImpl(fdi);
   251                     break;
   250                     break;
   252                 }
   251                 }
   253             }
   252             }
   254         }
   253         }
   255     }
   254     }