1 55 56 package org.apache.commons.el; 57 58 import javax.servlet.jsp.el.VariableResolver ; 59 import javax.servlet.jsp.el.ELException ; 60 import javax.servlet.jsp.el.FunctionMapper ; 61 62 71 72 public class NamedValue 73 extends Expression 74 { 75 79 84 String mName; 85 public String getName () 86 { return mName; } 87 88 93 public NamedValue (String pName) 94 { 95 mName = pName; 96 } 97 98 105 public String getExpressionString () 106 { 107 return StringLiteral.toIdentifierToken (mName); 108 } 109 110 115 public Object evaluate (VariableResolver pResolver, 116 FunctionMapper functions, 117 Logger pLogger) 118 throws ELException 119 { 120 if (pResolver == null) { 121 return null; 122 } 123 else { 124 return pResolver.resolveVariable (mName); 125 } 126 } 127 128 } 130 | Popular Tags |