Пример #1
0
 /** Special constructor called from Class. */
 NamedIterator(Vector v, Object type, int modifierMask) {
   // Using type 'Object' instead of 'java.lang.Class' for parameter type
   // is a workaround to avoid having to generate fully qualified class names
   // when applying BeatyJ to this code. (Otherwise, would confuse with class
   // 'Class' in this package.)
   this();
   for (Enumeration e = v.elements(); e.hasMoreElements(); ) {
     Member m = (Member) e.nextElement();
     int mod = m.getModifier();
     if (((modifierMask & mod) != 0) && (m.getClass().isAssignableFrom((java.lang.Class) type))) {
       data.addElement(m);
     }
   }
   reset();
   lockReadonly(); // read-only in this mode
 }