/** * Create a new DirectFieldAccessor for the given target object. * @param target the target object to access */ public DirectFieldAccessor(final Object target) { Assert.notNull(target, "Target object must not be null"); this.target = target; ReflectionUtils.doWithFields(this.target.getClass(), new ReflectionUtils.FieldCallback() { public void doWith(Field field) { if (fieldMap.containsKey(field.getName())) { // ignore superclass declarations of fields already found in a subclass } else { fieldMap.put(field.getName(), field); } } }); this.typeConverterDelegate = new TypeConverterDelegate(this, target); registerDefaultEditors(); setExtractOldValueForEditor(true); }