Gets all the public fields defined in this type, including super types.

@see Class#getFields()
433092
public List<FieldRef> getFields() {
        Map<String,FieldRef> fields = new LinkedHashMap<String,FieldRef>();
        for (Klass<?> k = this; k!=null; k=k.getSuperClass()) {
            for (FieldRef f : k.getDeclaredFields()) {
                String name = f.getName();
                if (!fields.containsKey(name) && f.isRoutable()) {
                    fields.put(name,f);
                }
            }
        }

        return new ArrayList<FieldRef>(fields.values());
    }
832719
static Field[] getAllFields(Class<?> type) {
        List<Field> fields = new ArrayList<Field>();
        for (Class<?> clazz = type; clazz != null; clazz = clazz.getSuperclass()) {
            if (clazz == MPBase.class ||
                    clazz == Object.class) {
                break;
            }
            fields.addAll(Arrays.asList(clazz.getDeclaredFields()));
        }
        Field[] fieldsArray = new Field[fields.size()];
        return fields.toArray(fieldsArray);
    }
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;
   }
1317057
public List<String> getDeclaredFieldNames() {
		if (this.declaredFieldNames == null) {
			this.declaredFieldNames = new ArrayList<String>(this.declaredFields.size());
			for (DOField f : this.declaredFields) {
				this.declaredFieldNames.add(f.getName());
			}
		}
		return this.declaredFieldNames;
	}
960512
private static Collection<Field> getAllFields(Class<?> type) {
    final Collection<Field> allFields = new ArrayList<>();

    while (type != Object.class) {
      Collections.addAll(allFields, type.getDeclaredFields());
      type = type.getSuperclass();
    }

    return Collections.unmodifiableCollection(allFields);
  }
316313
public static Field[] getAllFields(final Class<?> cls) {
        final List<Field> allFieldsList = getAllFieldsList(cls);
        return allFieldsList.toArray(new Field[allFieldsList.size()]);
    }
747784
private final Field[] getFields (Class<? extends Object> cls) {
    	Field[] ret = SEEN_CLASSES.get(cls);
        if (ret != null) {
            return ret;
        }

        List<Field> retL = new ArrayList<Field>();
        for (Field f: cls.getDeclaredFields ()) {
        	if (!isSimpleType(f)) {
        		retL.add(f);
        		f.setAccessible(true);
        	}
        }

        //the 2nd case can occur if the incoming object is of type Object.class
        //--> See Test_084_SerailizationBugRefToPM.
        if (cls.getSuperclass() != Object.class && cls != Object.class) {
        	for (Field f: getFields(cls.getSuperclass())) {
        		retL.add(f);
        	}
        }
        ret = retL.toArray(new Field[retL.size()]);
        SEEN_CLASSES.put(cls, ret);
        return ret;
    }
496491
protected function getOwnFields()
    {
        $type = $this->getType();

        if (isset($this->fields[$type])) {
            return $this->fields[$type];
        }
    }
772068
public static Field[] getAllDeclaredFields(Class<?> clazz) {
		Field[] declaredFields = clazz.getDeclaredFields();
		Class<?> superClass = clazz.getSuperclass();
		if (superClass != null && superClass != Object.class) {
			declaredFields = ArrayUtil.concat(declaredFields, getAllDeclaredFields(superClass));
		}
		return declaredFields;
	}
231184
public static List<Field> getInstanceFields(Class type) {
        List<Field> fields = Lists.newArrayList(type.getDeclaredFields());
        return ImmutableList.copyOf(Iterables.filter(fields, InstanceFieldPredicate.PREDICATE));
    }
1357735
private Field[] getFields(final Class<?> currentClass) {
        final Field[] objectFields = AccessController.doPrivileged(new PrivilegedAction<Field[]>() {
            @Override
            public Field[] run() {
                try {
                    Field[] tempObjectFields = currentClass.getDeclaredFields();
                    if (tempObjectFields.length != 0) {
                        AccessibleObject.setAccessible(tempObjectFields, true);
                    }
                    return tempObjectFields;
                } catch (Throwable t) {
                    // Introspection of field failed
                    StringWriter sw = new StringWriter();
                    PrintWriter pw = new PrintWriter(sw);
                    t.printStackTrace(pw);
                    addNewChild("Failed to resolve fields for " + currentClass.getName(), sw.toString());
                }
                return new Field[0];
            }
        });
        return objectFields;
    }
501527
public static Field[] getAllFields(Class<?> clazz) {
        if (clazz == null) {
            throw new IllegalArgumentException("You must specify the class that contains the fields");
        }
        Set<Field> fields = new LinkedHashSet<Field>();

        Class<?> thisType = clazz;

        while (thisType != null) {
            final Field[] declaredFields = thisType.getDeclaredFields();
            for (Field field : declaredFields) {
                field.setAccessible(true);
                fields.add(field);
            }
            thisType = thisType.getSuperclass();
        }
        return fields.toArray(new Field[fields.size()]);
    }
55911
public GenericField[] getFields()
	{
		Collection<GenericField> values = fieldMap.values();
		
		if(values == null || values.isEmpty())
			return null;
		
		GenericField[] fieldMirrors = new GenericField[values.size()];
		
		values.toArray(fieldMirrors);
		
		return fieldMirrors;
	}
379619
public String getFields() {
        StateHelper helper = this.getStateHelper(true);
        return (String) helper.get(FIELDS_KEY);
    }
583325
static List<Field> getAllFieldsOfClass0(Class<?> clazz) {
        List<Field> fields = CollectionUtil.createArrayList();
        for (Class<?> itr = clazz; hasSuperClass(itr); ) {
            fields.addAll(Arrays.asList(itr.getDeclaredFields()));
            itr = itr.getSuperclass();
        }

        return fields;
    }
756066
private static Field[] getAllFieldsRec(Class clazz, List<Field> fields) {
        Class superClazz = clazz.getSuperclass();
        if (superClazz != null) {
            getAllFieldsRec(superClazz, fields);
        }

        fields.addAll(Arrays.asList(clazz.getDeclaredFields()));
        return fields.toArray(new Field[fields.size()]);
    }
975771
public static <T> List<Field> getDeclaredFields(T type) {
        return new ArrayList<>(asList(type.getClass().getDeclaredFields()));
    }