1 16 package org.apache.commons.betwixt.expression; 17 18 23 public class StringExpression implements Expression { 24 25 26 private static final StringExpression singleton = new StringExpression(); 27 28 32 public static StringExpression getInstance() { 33 return singleton; 34 } 35 36 37 public StringExpression() { 38 } 39 40 45 public Object evaluate(Context context) { 46 Object value = context.getBean(); 47 if ( value != null ) { 48 return value.toString(); 49 } 50 return null; 51 } 52 53 57 public void update(Context context, String newValue) { 58 } 60 61 65 public String toString() { 66 return "StringExpression"; 67 } 68 69 } 70 | Popular Tags |