com.opensymphony.xwork.util
Class TextParseUtil

java.lang.Object
  extended bycom.opensymphony.xwork.util.TextParseUtil

public class TextParseUtil
extends Object

Utility class for text parsing.

Author:
Jason Carreira Created Feb 10, 2003 8:55:11 PM

Constructor Summary
TextParseUtil()
           
 
Method Summary
static String translateVariables(String expression, OgnlValueStack stack)
          Converts all instances of ${...} in expression to the value returned by a call to OgnlValueStack.findValue(java.lang.String).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextParseUtil

public TextParseUtil()
Method Detail

translateVariables

public static String translateVariables(String expression,
                                        OgnlValueStack stack)
Converts all instances of ${...} in expression to the value returned by a call to OgnlValueStack.findValue(java.lang.String). If an item cannot be found on the stack (null is returned), then the entire variable ${...} is not displayed, just as if the item was on the stack but returned an empty string.

Parameters:
expression - an expression that hasn't yet been translated
Returns:
the parsed expression

XWork Project Page