org.apache.struts2.util
类 ComponentUtils

java.lang.Object
  继承者 org.apache.struts2.util.ComponentUtils

public class ComponentUtils
extends Object

Various static methods used with components


构造方法摘要
ComponentUtils()
           
 
方法摘要
static boolean altSyntax(com.opensymphony.xwork2.util.ValueStack stack)
          Is the altSyntax enabled?
static boolean isExpression(Object value)
          Check if object is expression base on altSyntax
static String stripExpressionIfAltSyntax(com.opensymphony.xwork2.util.ValueStack stack, String expr)
          If altSyntax (%{...}) is applied, simply strip the "%{" and "}" off.
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

ComponentUtils

public ComponentUtils()
方法详细信息

stripExpressionIfAltSyntax

public static String stripExpressionIfAltSyntax(com.opensymphony.xwork2.util.ValueStack stack,
                                                String expr)
If altSyntax (%{...}) is applied, simply strip the "%{" and "}" off.

参数:
stack - the ValueStack where the context value is searched for.
expr - the expression (must be not null)
返回:
the stripped expression if altSyntax is enabled. Otherwise the parameter expression is returned as is.

altSyntax

public static boolean altSyntax(com.opensymphony.xwork2.util.ValueStack stack)
Is the altSyntax enabled? [TRUE]

参数:
stack - the ValueStack where the context value is searched for.
返回:
true if altSyntax is activated. False otherwise. See struts.properties where the altSyntax flag is defined.

isExpression

public static boolean isExpression(Object value)
Check if object is expression base on altSyntax

参数:
value - to treat as an expression
返回:
true if it is an expression