@Override public Object getValue(Object obj) { if (name.equals("this")) { return thisObject; } else { return BeanUtils.atIndex(thisObject, name); } }
/** * Gets the field value. * * @return the value of the field */ public Object fieldValue() { if (!path) { FieldAccess field1 = this.field(); return field1.getValue(objectUnderTest); } else { return BeanUtils.atIndex(objectUnderTest, name.toString()); } }