程序包 org.xmeta.util

类 OgnlUtil

java.lang.Object
org.xmeta.util.OgnlUtil

public class OgnlUtil extends Object
  • 构造器详细资料

    • OgnlUtil

      public OgnlUtil()
  • 方法详细资料

    • getValue

      public static Object getValue(Object tree, Object root)
    • getValue

      public static Object getValue(String expression, Object root)
    • setValue

      public static void setValue(Object tree, Object root, Object value)
    • setValue

      public static void setValue(String expression, Object root, Object value)
    • getValue

      public static Object getValue(Thing thing, String pathAttributeName, Object root)
      通过Ognl表达式取值, 模型的属性是Ognl的表达式。使用这种方式缓存了Ognl表达式。
      参数:
      thing - 模型
      pathAttributeName - 属性
      root - 根
      返回:
    • getValue

      public static Object getValue(Thing thing, String pathAttributeName, String pathAttributeValue, Object root)
      通过Ognl表达式取值, 模型的属性是Ognl的表达式。使用这种方式缓存了Ognl表达式。
      参数:
      thing - 模型
      pathAttributeName - 属性
      pathAttributeValue - 是模型的属性值,如果为空返回null
      root - 根对象
      返回:
    • getPathCache

      public static org.xmeta.util.OgnlUtil.PathCache getPathCache(Thing thing, String attributeName)
    • getCachedExpression

      public static Object getCachedExpression(Thing thing, String attributeName)
    • setValue

      public static void setValue(Thing thing, String pathAttributeName, String pathAttributeValue, Object value, Object root)