fieldCallBack.doForField() for each field in each class
3058
private void forEachFieldDo(FieldCallBack fieldCallBack) {
		Class<?> clazz = this.getClass();
		
		while (true) {
			
			Field[] fields = clazz.getDeclaredFields();
			try {
				for (Field field : fields) {
					// FIXME: test skipped cases
					// skip Logger object
					if (field.getType() == Logger.class)
						continue;
					// skip fields annotated with @Transient
					if (field.getAnnotation(Transient.class) != null)
						continue;
					// skip serialVersionUID
					if ("serialVersionUID".equals(field.getName()))
						continue;
					field.setAccessible(true);
					fieldCallBack.doForField(field);
				} 
			} catch (IllegalArgumentException e) {
				throw new RuntimeException(e);
			} catch (IllegalAccessException e) {
				throw new RuntimeException(e);
			}
			
			if (clazz.getName().equals(DataObject.class.getName()))
				break;
			
			clazz = clazz.getSuperclass();
		}
	}
422253
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, CLASS_INFO_CLASS_NAME, 40, null, null);
        field = new FieldInfo(this, CLASS_INFO_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, CLASS_FIELD_CLASS, 60, null, null);
        field = new FieldInfo(this, CLASS_FIELD_SEQUENCE, 10, null, new Integer(0));
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, CLASS_FIELD_NAME, 40, null, null);
        field = new FieldInfo(this, CLASS_FIELD_DESC, 30, null, null);
        field = new FieldInfo(this, CLASS_FIELD_PROTECT, 30, null, null);
        field = new FieldInfo(this, CLASS_FIELD_INITIAL, 32000, null, null);
        field = new FieldInfo(this, CLASS_FIELD_INITIAL_VALUE, 32000, null, null);
        field = new FieldInfo(this, CLASS_FIELDS_TYPE, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, INCLUDE_SCOPE, 10, null, new Integer(0x004));
        field.setDataClass(Integer.class);
    }
868198
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, NAME, 50, null, null);
        field = new FieldInfo(this, PARENT_FOLDER_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, SEQUENCE, 5, null, null);
        field.setDataClass(Short.class);
        field = new FieldInfo(this, COMMENT, 255, null, null);
        field = new FieldInfo(this, CODE, 30, null, null);
        field = new FieldInfo(this, TYPE, 50, null, null);
        field = new FieldInfo(this, FIELD_VALUE, 255, null, null);
        field = new FieldInfo(this, RETURNS_VALUE, 50, null, null);
        field = new FieldInfo(this, MAXIMUM, 10, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, SYSTEM_NAME, 30, null, null);
        field = new FieldInfo(this, COMMENTS, 10, null, null);
        field.setDataClass(Boolean.class);
    }
1259486
private static Field[] getAllFields(Object delegate) {
		
		ArrayList<Field> fields = new ArrayList<Field>(Arrays.asList(delegate.getClass()
				.getDeclaredFields()));
		Class superClass = delegate.getClass().getSuperclass();
		while(superClass != null){
		
		if (superClass != null) {
			Field[] parentFields = superClass.getDeclaredFields();
			if (parentFields.length != 0) {
				fields.addAll(Arrays.asList(superClass
						.getDeclaredFields()));
			}
			
		}
		superClass = superClass.getSuperclass();
		}
		return fields.toArray(new Field[fields.size()]);

	}
1177309
def get_fields(self):
        
        for c in self.classes.values():
            for f in c.get_fields():
                yield f
168970
public void each(Each<Props> each) {

        for (Map.Entry<String, Props> entry : pathMap.entrySet()) {
            Props props = entry.getValue();

            each.execute(props);
        }
    }
792010
private static CtClass[] generateClassField(Class<?>... classes) throws NotFoundException {
        CtClass[] result = new CtClass[classes.length];
        for (int i = 0; i < classes.length; i++) {
            result[i] = cp.get(classes[i].getName());
        }
        return result;
    }
615058
private void sortFields()
    {
        HashMap            fields          = new HashMap();
        ArrayList          fieldsWithId    = new ArrayList();
        ArrayList          fieldsWithoutId = new ArrayList();
        FieldDescriptorDef fieldDef;

        for (Iterator it = getFields(); it.hasNext(); )
        {
            fieldDef = (FieldDescriptorDef)it.next();
            fields.put(fieldDef.getName(), fieldDef);
            if (fieldDef.hasProperty(PropertyHelper.OJB_PROPERTY_ID))
            {
                fieldsWithId.add(fieldDef.getName());
            }
            else
            {
                fieldsWithoutId.add(fieldDef.getName());
            }
        }

        Collections.sort(fieldsWithId, new FieldWithIdComparator(fields));

        ArrayList result = new ArrayList();

        for (Iterator it = fieldsWithId.iterator(); it.hasNext();)
        {
            result.add(getField((String)it.next()));
        }
        for (Iterator it = fieldsWithoutId.iterator(); it.hasNext();)
        {
            result.add(getField((String)it.next()));
        }

        _fields = result;
    }
690218
def get_fields_by_class(cls, field_class):
        

        ret = []

        for key, val in getattr(cls, '_fields').items():
            if isinstance(val, field_class):
                ret.append(key)
        return ret
1034987
def for_each_child(node, callback):
    """"""
    for name in node._fields:
        value = getattr(node, name)
        if isinstance(value, list):
            for item in value:
                if isinstance(item, ast.AST):
                    callback(item)
        elif isinstance(value, ast.AST):
            callback(value)
849172
private Method[] settersMethodForField(Field field) {
    List<Method> methods = new ArrayList<>();
    for (Method method : field.getDeclaringClass().getDeclaredMethods()) {
      if (Ascii.toLowerCase(method.getName()).equals("set" + Ascii.toLowerCase(field.getName()))
          && method.getParameterTypes().length == 1) {
        methods.add(method);
      }
    }
    return methods.toArray(new Method[0]);
  }
274992
private void getFields(ArrayList<JField> fieldList)
  {
    for (JField field : getDeclaredFields()) {
      if (! fieldList.contains(field))
        fieldList.add(field);
    }

    if (getSuperClass() != null) {
      for (JField field : getSuperClass().getFields()) {
        if (! fieldList.contains(field))
          fieldList.add(field);
      }
    }
  }
1336617
private Field getFieldRecursive(Class c, String name) throws NoSuchFieldException
    {
        try
        {
            return c.getDeclaredField(name);
        }
        catch (NoSuchFieldException e)
        {
            // if field  could not be found in the inheritance hierarchy, signal error
            if ((c == Object.class) || (c.getSuperclass() == null) || c.isInterface())
            {
                throw e;
            }
            // if field could not be found in class c try in superclass
            else
            {
                return getFieldRecursive(c.getSuperclass(), name);
            }
        }
    }
830288
@GwtIncompatible("Class.getDeclaredFields")
	public ToStringBuilder addAllFields() {
		List<Field> fields = getAllDeclaredFields(instance.getClass());
		for(Field field : fields) {
			addField(field);
		}
		return this;
	}
43693
public static List<Field> getDeclaredFields(@NonNull Class<?> clazz, boolean recursive) {
      List<Field> fields = new ArrayList<>();
      do {
         fields.addAll(Arrays.asList(clazz.getDeclaredFields()));
         clazz = clazz.getSuperclass();
      } while (recursive && clazz != null && clazz != Object.class);
      return fields;
   }
1242305
public static List<Field> findMatchedFields(Class targetClass, Class ann) {

        List<Field> ret = new ArrayList<Field>();
        if (targetClass == null) {
            return ret;
        }
        
        // Keep backing up the inheritance hierarchy.
        do {
            // Copy each field declared on this class unless it's static or
            // file.
            Field[] fields = targetClass.getDeclaredFields();
            for (int i = 0; i < fields.length; i++) {
                if (ann == null) {
                    ret.add(fields[i]);
                    continue;
                }
                Annotation protobuf = fields[i].getAnnotation(ann);
                if (protobuf != null) {
                    ret.add(fields[i]);
                }
            }
            targetClass = targetClass.getSuperclass();
        } while (targetClass != null && targetClass != Object.class);

        return ret;
    }
234895
void defineFields(ClassVisitor writer) {
    for (Variable var : allVariables) {
      var.maybeDefineField(writer);
    }
    if (currentCalleeField != null) {
      currentCalleeField.defineField(writer);
    }
    if (currentRendereeField != null) {
      currentRendereeField.defineField(writer);
    }
    if (currentAppendable != null) {
      currentAppendable.defineField(writer);
    }
  }