接口 ValueStack:com.opensymphony.xwork2.util
2015-11-08 21:10
495 查看
相关阅读:
在 Struts 2 中自定义支持 OGNL 的标签:http://blog.csdn.net/ieayoio/article/details/49721587
API:http://www.boyunjian.com/javadoc/com.opensymphony/xwork-core/2.1.6/_/com/opensymphony/xwork2/util/ValueStack.html
com.opensymphony.xwork2.util
所有已知实现类:OgnlValueStack
ValueStack allows multiple beans to be pushed in and dynamic EL expressions to be evaluated against it. When evaluating an expression, the stack will be searched down the stack, from the latest objects pushed in
to the earliest, looking for a bean with a getter or setter for the given property or a method of the given name (depending on the expression being evaluated).
字段
方法
另请参阅:常量字段值
另请参阅:常量字段值
Gets the context for this value stack. The context holds all the information in the value stack and it's surroundings.
返回:the context.
Sets the default type to convert to if no type is provided when getting a value.
参数:
Set a override map containing
See the unit test for ValueStackTest for examples.
参数:
Gets the override map if anyone exists.
返回:the override map, null if not set.
Get the CompoundRoot which holds the objects pushed onto the stack
返回:the root
Attempts to set a property on a bean in the stack with the given expression using the default search order.
参数:
Attempts to set a property on a bean in the stack with the given expression using the default search order.
参数:
Find a value by evaluating the given expression against the stack in the default search order.
参数:
返回:the result of evaluating the expression
Find a value by evaluating the given expression against the stack in the default search order.
参数:
返回:the result of evaluating the expression
Get the object on the top of the stack without changing the stack.
返回:the object on the top.
另请参阅:
Get the object on the top of the stack and remove it from the stack.
返回:the object on the top of the stack
另请参阅:
Put this object onto the top of the stack
参数:
另请参阅:
Sets an object on the stack with the given key so it is retrievable by
参数:
Get the number of objects in the stack
返回:the number of objects in the stack
在 Struts 2 中自定义支持 OGNL 的标签:http://blog.csdn.net/ieayoio/article/details/49721587
API:http://www.boyunjian.com/javadoc/com.opensymphony/xwork-core/2.1.6/_/com/opensymphony/xwork2/util/ValueStack.html
com.opensymphony.xwork2.util
接口 ValueStack
所有已知实现类:OgnlValueStackpublic interface ValueStack
ValueStack allows multiple beans to be pushed in and dynamic EL expressions to be evaluated against it. When evaluating an expression, the stack will be searched down the stack, from the latest objects pushed in
to the earliest, looking for a bean with a getter or setter for the given property or a method of the given name (depending on the expression being evaluated).
字段概要
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String | REPORT_ERRORS_ON_NO_PROP |
static java.lang.String | VALUE_STACK |
方法概要
限定符和类型 | 方法和说明 |
---|---|
java.lang.String | findString(java.lang.String expr) |
java.lang.String | findString(java.lang.String expr, boolean throwExceptionOnFailure) |
java.lang.Object | findValue(java.lang.String expr) Find a value by evaluating the given expression against the stack in the default search order. |
java.lang.Object | findValue(java.lang.String expr, boolean throwExceptionOnFailure) |
java.lang.Object | findValue(java.lang.String expr, java.lang.Class asType) Find a value by evaluating the given expression against the stack in the default search order. |
java.lang.Object | findValue(java.lang.String expr, java.lang.Class asType, boolean throwExceptionOnFailure) |
java.util.Map<java.lang.String,java.lang.Object> | getContext() Gets the context for this value stack. |
java.util.Map<java.lang.Object,java.lang.Object> | getExprOverrides() Gets the override map if anyone exists. |
CompoundRoot | getRoot() Get the CompoundRoot which holds the objects pushed onto the stack |
java.lang.Object | peek() Get the object on the top of the stack without changing the stack. |
java.lang.Object | pop() Get the object on the top of the stack and remove it from the stack. |
void | push(java.lang.Object o) Put this object onto the top of the stack |
void | set(java.lang.String key, java.lang.Object o) Sets an object on the stack with the given key so it is retrievable by findValue(String), findValue(String, Class) |
void | setDefaultType(java.lang.Class defaultType) Sets the default type to convert to if no type is provided when getting a value. |
void | setExprOverrides(java.util.Map<java.lang.Object,java.lang.Object> overrides) Set a override map containing key -> valuesthat takes precedent when doing find operations on the ValueStack. |
void | setValue(java.lang.String expr, java.lang.Object value) Attempts to set a property on a bean in the stack with the given expression using the default search order. |
void | setValue(java.lang.String expr, java.lang.Object value, boolean throwExceptionOnFailure) Attempts to set a property on a bean in the stack with the given expression using the default search order. |
int | size() Get the number of objects in the stack |
字段详细资料
VALUE_STACK
static final java.lang.String VALUE_STACK
另请参阅:常量字段值
REPORT_ERRORS_ON_NO_PROP
static final java.lang.String REPORT_ERRORS_ON_NO_PROP
另请参阅:常量字段值
方法详细资料
getContext
java.util.Map<java.lang.String,java.lang.Object> getContext()
Gets the context for this value stack. The context holds all the information in the value stack and it's surroundings.
返回:the context.
setDefaultType
void setDefaultType(java.lang.Class defaultType)
Sets the default type to convert to if no type is provided when getting a value.
参数:
defaultType- the new default type
setExprOverrides
void setExprOverrides(java.util.Map<java.lang.Object,java.lang.Object> overrides)
Set a override map containing
key -> valuesthat takes precedent when doing find operations on the ValueStack.
See the unit test for ValueStackTest for examples.
参数:
overrides- overrides map.
getExprOverrides
java.util.Map<java.lang.Object,java.lang.Object> getExprOverrides()
Gets the override map if anyone exists.
返回:the override map, null if not set.
getRoot
CompoundRoot getRoot()
Get the CompoundRoot which holds the objects pushed onto the stack
返回:the root
setValue
void setValue(java.lang.String expr, java.lang.Object value)
Attempts to set a property on a bean in the stack with the given expression using the default search order.
参数:
expr- the expression defining the path to the property to be set.
value- the value to be set into the named property
setValue
void setValue(java.lang.String expr, java.lang.Object value, boolean throwExceptionOnFailure)
Attempts to set a property on a bean in the stack with the given expression using the default search order.
参数:
expr- the expression defining the path to the property to be set.
value- the value to be set into the named property
throwExceptionOnFailure- a flag to tell whether an exception should be thrown if there is no property with the given name.
findString
java.lang.String findString(java.lang.String expr)
findString
java.lang.String findString(java.lang.String expr, boolean throwExceptionOnFailure)
findValue
java.lang.Object findValue(java.lang.String expr)
Find a value by evaluating the given expression against the stack in the default search order.
参数:
expr- the expression giving the path of properties to navigate to find the property value to return
返回:the result of evaluating the expression
findValue
java.lang.Object findValue(java.lang.String expr, boolean throwExceptionOnFailure)
findValue
java.lang.Object findValue(java.lang.String expr, java.lang.Class asType)
Find a value by evaluating the given expression against the stack in the default search order.
参数:
expr- the expression giving the path of properties to navigate to find the property value to return
asType- the type to convert the return value to
返回:the result of evaluating the expression
findValue
java.lang.Object findValue(java.lang.String expr, java.lang.Class asType, boolean throwExceptionOnFailure)
peek
java.lang.Object peek()
Get the object on the top of the stack without changing the stack.
返回:the object on the top.
另请参阅:
CompoundRoot.peek()
pop
java.lang.Object pop()
Get the object on the top of the stack and remove it from the stack.
返回:the object on the top of the stack
另请参阅:
CompoundRoot.pop()
push
void push(java.lang.Object o)
Put this object onto the top of the stack
参数:
o- the object to be pushed onto the stack
另请参阅:
CompoundRoot.push(Object)
set
void set(java.lang.String key, java.lang.Object o)
Sets an object on the stack with the given key so it is retrievable by
findValue(String),
findValue(String, Class)
参数:
key- the key
o- the object
size
int size()
Get the number of objects in the stack
返回:the number of objects in the stack
相关文章推荐
- UINavigationController 总结
- __builtin_expect 解惑
- lightoj Answering Queries 1369 (数学转换&&技巧)
- HDU 1560DNA sequence
- 使用VS2010调用QtDesigner设计的UI文件,并实现控件功能
- EasyUI - 后台管理系统 - 增加,删除,修改
- IOS UISwitch 感觉官方提供的拓展性不够好,老感觉这个东西项目中用到需要自己定制
- UITableView 滑动自动加载更多数据
- Gson 解析 json中 value为数组
- Light OJ 1369 - Answering Queries 【规律】
- 快速排序
- Adreno Profiler GPU frequency clocks per/second
- 【2015-2016 ACM-ICPC, NEERC, Southern Subregional Contest F】【贪心+ STL-优先队列】 Gourmet and Banquet 最大活动时间
- UIGestureRecognizer(进阶)
- UIFont中fontName大全
- iOS之UILabel显示内容自动换行
- ios开发-UIImageView的使用,点击图片刷新对应数据的过程
- 设置IIS7文件上传的最大大小 maxAllowedContentLength,maxRequestLength
- 1369 - Answering Queries
- ios开发-UISlider通过滑动添加单元格功能