1 25 26 package org.apache.jasper.runtime; 27 28 import java.util.HashMap ; 29 import javax.el.ELContext; 30 import javax.el.ELResolver; 31 import javax.el.VariableMapper; 32 import javax.el.ValueExpression; 33 34 35 43 44 public class VariableMapperImpl extends VariableMapper 45 { 46 50 public VariableMapperImpl () { 51 map = new HashMap (); 52 } 53 54 59 public ValueExpression resolveVariable (String variable) { 60 return (ValueExpression) map.get(variable); 61 } 62 63 public ValueExpression setVariable(String variable, 64 ValueExpression expression) { 65 ValueExpression prev = null; 66 if (expression == null) { 67 map.remove(variable); 68 } else { 69 prev = (ValueExpression) map.get(variable); 70 map.put(variable, expression); 71 } 72 return prev; 73 } 74 75 private HashMap map; 76 } 77 | Popular Tags |