|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Language
Defines a syntax for expressions that can be used to access and change properties (bean or indexed) inside a target object. This is similar to the expression languages found in the JSTL EL, the Spring framework, Struts, and Velocity. Below are some example expressions.
JSTL EL example:
myBean.myMap.myProperty
Spring example:
myBean.myMap["myProperty"]
| Method Summary | |
|---|---|
java.lang.Object |
get(java.lang.Object target,
java.lang.String expression)
Retrieve the property indicated by expression from
target. |
java.lang.Class |
getType(java.lang.Object target,
java.lang.String expression)
Specifies the least restrictive type that may be assigned to property indicated by the given expression. |
boolean |
isProperty(java.lang.String expression)
Indicates whether the given expression refers to a direct property of a target object. |
void |
set(java.lang.Object target,
java.lang.String expression,
java.lang.Object value)
Sets the property indicated by expression on
target. |
| Method Detail |
|---|
java.lang.Class getType(java.lang.Object target,
java.lang.String expression)
throws LanguageException
expression. If any type can be
assigned to the property, this method returns Object.class.
target - the target being analyzedexpression - indicates the property of target that is to be
analyzed
expression
LanguageException - if target is null or InvalidExpressionException - if expression not a valid expression
boolean isProperty(java.lang.String expression)
throws LanguageException
expression - the expression to evaluate
true, if the expression references a direct
property of the target object or false, otherwise
LanguageException - an error occurrs while evaluating an otherwise valid
expression
InvalidExpressionException - if expression not a valid expression
java.lang.Object get(java.lang.Object target,
java.lang.String expression)
throws LanguageException
expression from
target.
target - the object from which information will be retrievedexpression - an expression specifying which information to retrieve
expression from
target
LanguageException - if target is null or InvalidExpressionException - if expression not a valid expression
void set(java.lang.Object target,
java.lang.String expression,
java.lang.Object value)
throws LanguageException
expression on
target.
target - the object that will be modifiedexpression - an expression specifying which information will be modifiedvalue - the information to be changed
LanguageException - if target is null or InvalidExpressionException - if expression not a valid expression
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||