コード例 #1
0
 /** @apilevel internal */
 private HashMap memberFieldsMap_compute() {
   HashMap map = new HashMap(localFieldsMap());
   for (Iterator outerIter = superinterfacesIterator(); outerIter.hasNext(); ) {
     TypeDecl typeDecl = (TypeDecl) outerIter.next();
     for (Iterator iter = typeDecl.fieldsIterator(); iter.hasNext(); ) {
       FieldDeclaration f = (FieldDeclaration) iter.next();
       if (f.accessibleFrom(this) && !f.isPrivate() && !localFieldsMap().containsKey(f.name())) {
         putSimpleSetElement(map, f.name(), f);
       }
     }
   }
   return map;
 }
コード例 #2
0
 /** @apilevel internal */
 private SimpleSet memberFields_compute(String name) {
   SimpleSet fields = localFields(name);
   if (!fields.isEmpty()) return fields;
   for (Iterator outerIter = superinterfacesIterator(); outerIter.hasNext(); ) {
     TypeDecl typeDecl = (TypeDecl) outerIter.next();
     for (Iterator iter = typeDecl.memberFields(name).iterator(); iter.hasNext(); ) {
       FieldDeclaration f = (FieldDeclaration) iter.next();
       if (f.accessibleFrom(this) && !f.isPrivate()) {
         fields = fields.add(f);
       }
     }
   }
   return fields;
 }