Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
ef8f8820
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ef8f8820
编写于
8月 16, 2008
作者:
A
Andy Clement
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sorting out javadoc, promoted isWritable() to this interface (for now)
上级
1d2e89d7
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
42 addition
and
25 deletion
+42
-25
org.springframework.expression/src/main/java/org/springframework/expression/Expression.java
.../main/java/org/springframework/expression/Expression.java
+42
-25
未找到文件。
org.springframework.expression/src/main/java/org/springframework/expression/Expression.java
浏览文件 @
ef8f8820
...
@@ -15,9 +15,6 @@
...
@@ -15,9 +15,6 @@
*/
*/
package
org.springframework.expression
;
package
org.springframework.expression
;
import
org.springframework.expression.spel.SpelException
;
/**
/**
* An expression capable of evaluating itself against context objects. Encapsulates the details of a previously parsed
* An expression capable of evaluating itself against context objects. Encapsulates the details of a previously parsed
* expression string. Provides a common abstraction for expression evaluation independent of any language like OGNL or
* expression string. Provides a common abstraction for expression evaluation independent of any language like OGNL or
...
@@ -30,27 +27,28 @@ public interface Expression {
...
@@ -30,27 +27,28 @@ public interface Expression {
/**
/**
* Evaluate this expression in the default standard context.
* Evaluate this expression in the default standard context.
*
* @return the evaluation result
* @return the evaluation result
* @throws EvaluationException
an exception occurred during expression
evaluation
* @throws EvaluationException
if there is a problem during
evaluation
*/
*/
public
Object
getValue
()
throws
EvaluationException
;
public
Object
getValue
()
throws
EvaluationException
;
/**
/**
* Evaluate the expression in the default standard context. If the result of the evaluation
* Evaluate the expression in the default standard context. If the result of the evaluation does not match (and
* does not match (and cannot be converted to) the expected result type then an
* cannot be converted to) the expected result type then an exception will be returned.
* exception will be returned.
*
*
* @param
expect
edResultType the class the caller would like the result to be
* @param
desir
edResultType the class the caller would like the result to be
* @return the
value of the expression
* @return the
evaluation result
* @throws EvaluationException if there is a problem
with evaluation of the expression.
* @throws EvaluationException if there is a problem
during evaluation
*/
*/
public
Object
getValue
(
Class
<?>
expect
edResultType
)
throws
EvaluationException
;
public
Object
getValue
(
Class
<?>
desir
edResultType
)
throws
EvaluationException
;
/**
/**
* Evaluate this expression in the provided context and return the result of evaluation.
* Evaluate this expression in the provided context and return the result of evaluation.
* @param context the context to evaluate this expression in
*
* @param context the context in which to evaluate the expression
* @return the evaluation result
* @return the evaluation result
* @throws EvaluationException
an exception occurred during expression
evaluation
* @throws EvaluationException
if there is a problem during
evaluation
*/
*/
public
Object
getValue
(
EvaluationContext
context
)
throws
EvaluationException
;
public
Object
getValue
(
EvaluationContext
context
)
throws
EvaluationException
;
...
@@ -60,34 +58,53 @@ public interface Expression {
...
@@ -60,34 +58,53 @@ public interface Expression {
* is not and cannot be converted to that type.
* is not and cannot be converted to that type.
*
*
* @param context the context in which to evaluate the expression
* @param context the context in which to evaluate the expression
* @param
expect
edResultType the class the caller would like the result to be
* @param
desir
edResultType the class the caller would like the result to be
* @return the
value of the expression
* @return the
evaluation result
* @throws
SpelException if there is a problem with evaluation of the expression.
* @throws
EvaluationException if there is a problem during evaluation
*/
*/
public
Object
getValue
(
EvaluationContext
context
,
Class
<?>
expect
edResultType
)
throws
EvaluationException
;
public
Object
getValue
(
EvaluationContext
context
,
Class
<?>
desir
edResultType
)
throws
EvaluationException
;
/**
/**
* Set this expression in the provided context to the value provided.
* Set this expression in the provided context to the value provided.
* @param context the context on which the new value should be set
*
* @param value the new value to set
* @param context the context in which to set the value of the expression
* @throws EvaluationException an exception occurred during expression evaluation
* @param value the new value
* @throws EvaluationException if there is a problem during evaluation
*/
*/
public
void
setValue
(
EvaluationContext
context
,
Object
value
)
throws
EvaluationException
;
public
void
setValue
(
EvaluationContext
context
,
Object
value
)
throws
EvaluationException
;
/**
/**
* Returns the most general type that can be passed to the {@link #setValue(EvaluationContext, Object)} method for the given
* Returns the most general type that can be passed to the {@link #setValue(EvaluationContext, Object)} method for
* context.
* the given context.
* @param context the context to evaluate
*
* @param context the context in which to evaluate the expression
* @return the most general type of value that can be set on this context
* @return the most general type of value that can be set on this context
* @throws EvaluationException
an exception occurred during expression evaluation
* @throws EvaluationException
if there is a problem determining the type
*/
*/
public
Class
getValueType
(
EvaluationContext
context
)
throws
EvaluationException
;
public
Class
getValueType
(
EvaluationContext
context
)
throws
EvaluationException
;
/**
* Returns the most general type that can be passed to the {@link #setValue(EvaluationContext, Object)} method using
* the default context.
*
* @return the most general type of value that can be set on this context
* @throws EvaluationException if there is a problem determining the type
*/
public
Class
getValueType
()
throws
EvaluationException
;
/**
/**
* Returns the original string used to create this expression, unmodified.
* Returns the original string used to create this expression, unmodified.
*
* @return the original expression string
* @return the original expression string
*/
*/
public
String
getExpressionString
();
public
String
getExpressionString
();
/**
* Determine if an expression can be written to, i.e. setValue() can be called.
*
* @param context the context in which the expression should be checked
* @return true if the expression is writable
* @throws EvaluationException if there is a problem determining if it is writable
*/
public
boolean
isWritable
(
EvaluationContext
context
)
throws
EvaluationException
;
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录