private Field getField(Object object, String name, Boolean read) throws NullPointerException,
	IllegalArgumentException, IllegalAccessException, NoSuchFieldException {

		Field field = null;

		for(Class<?> c = object.getClass(); c != null; c = c.getSuperclass()) {
			for(Field f : c.getDeclaredFields()){
				if(f.getName().equals(name) && !Modifier.isStatic(f.getModifiers())) {
					f.setAccessible(true);
					field = f;
				}
			}
		}

		if(field == null) {
			throw new NoSuchFieldException("No such field.");

		} else if(field.get(object) == null && read == true) {
			throw new NullPointerException("Null field value.");
		}

		return field;
	}