1 16 package org.apache.commons.betwixt.expression; 17 18 24 public class VariableExpression implements Expression { 25 26 27 private String variableName; 28 29 30 public VariableExpression() { 31 } 32 33 38 public VariableExpression(String variableName) { 39 this.variableName = variableName; 40 } 41 42 47 public Object evaluate(Context context) { 48 return context.getVariable( variableName ); 49 } 50 51 55 public String getVariableName() { 56 return variableName; 57 } 58 59 64 public void setVariableName(String variableName) { 65 this.variableName = variableName; 66 } 67 68 72 public void update(Context context, String newValue) { 73 } 75 76 80 public String toString() { 81 return "VariableExpression [variable name=" + variableName + "]"; 82 } 83 } 84 | Popular Tags |