Ejemplo n.º 1
0
 @Override
 public Object getValue(Object obj) {
   if (name.equals("this")) {
     return thisObject;
   } else {
     return BeanUtils.atIndex(thisObject, name);
   }
 }
Ejemplo n.º 2
0
  /**
   * 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());
    }
  }