Package org.zkoss.bind.impl
Class BindEvaluatorXImpl
- java.lang.Object
-
- org.zkoss.zk.xel.impl.SimpleEvaluator
-
- org.zkoss.bind.impl.BindEvaluatorXImpl
-
- All Implemented Interfaces:
java.io.Serializable,BindEvaluatorX,Evaluator
- Direct Known Subclasses:
BindEvaluatorXImplEx,ClientBinderResolver
public class BindEvaluatorXImpl extends SimpleEvaluator implements BindEvaluatorX
A simple implementation ofBindEvaluatorX.- Since:
- 6.0.0
- Author:
- henrichen
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BindEvaluatorXImpl(FunctionMapper mapper, java.lang.Class<? extends ExpressionFactory> expfcls)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<?>getType(BindContext ctx, Component comp, ExpressionX expression)Returns the result type of the specified expression.java.lang.ObjectgetValue(BindContext ctx, Component comp, ExpressionX expression)Sets the specified value to the property resolved from the specified expression.ValueReferencegetValueReference(BindContext ctx, Component comp, ExpressionX expression)Returns the result reference of the specified expression.booleanisReadOnly(BindContext ctx, Component comp, ExpressionX expression)Returns whether the specified expression a read only expression.protected XelContextnewXelContext(BindContext ctx, Component comp)ExpressionXparseExpressionX(BindContext ctx, java.lang.String expression, java.lang.Class<?> expectedType)Prepares the expressionX.voidsetValue(BindContext ctx, Component comp, ExpressionX expression, java.lang.Object value)Sets the specified value to the property resolved from the specified expression.-
Methods inherited from class org.zkoss.zk.xel.impl.SimpleEvaluator
evaluate, evaluate, getExpressionFactory, getExpressionFactoryClass, getFunctionMapper, getVariableResolver, newXelContext, parseExpression
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.zkoss.zk.xel.Evaluator
evaluate, evaluate, parseExpression
-
-
-
-
Constructor Detail
-
BindEvaluatorXImpl
public BindEvaluatorXImpl(FunctionMapper mapper, java.lang.Class<? extends ExpressionFactory> expfcls)
-
-
Method Detail
-
getValue
public java.lang.Object getValue(BindContext ctx, Component comp, ExpressionX expression) throws XelException
Description copied from interface:BindEvaluatorXSets the specified value to the property resolved from the specified expression.- Specified by:
getValuein interfaceBindEvaluatorX- Parameters:
ctx- the scoped bind context of this operationcomp- the scoped component context of this operationexpression- the expression that will resolve a property- Throws:
XelException
-
setValue
public void setValue(BindContext ctx, Component comp, ExpressionX expression, java.lang.Object value) throws XelException
Description copied from interface:BindEvaluatorXSets the specified value to the property resolved from the specified expression.- Specified by:
setValuein interfaceBindEvaluatorX- Parameters:
ctx- the scoped bind context of this operationcomp- the scoped component context of this operationexpression- the expression that will resolve a propertyvalue- the value to be set into the resolved property- Throws:
XelException
-
parseExpressionX
public ExpressionX parseExpressionX(BindContext ctx, java.lang.String expression, java.lang.Class<?> expectedType) throws XelException
Description copied from interface:BindEvaluatorXPrepares the expressionX.- Specified by:
parseExpressionXin interfaceBindEvaluatorXexpression- the expression to be prepared for being evaluated later.expectedType- the expected type of the result of the evaluation- Throws:
XelException
-
getType
public java.lang.Class<?> getType(BindContext ctx, Component comp, ExpressionX expression) throws XelException
Description copied from interface:BindEvaluatorXReturns the result type of the specified expression.- Specified by:
getTypein interfaceBindEvaluatorX- Parameters:
ctx- BindContextcomp- evaluation contextexpression- the expression that will resolve a property- Throws:
XelException
-
getValueReference
public ValueReference getValueReference(BindContext ctx, Component comp, ExpressionX expression) throws XelException
Description copied from interface:BindEvaluatorXReturns the result reference of the specified expression.- Specified by:
getValueReferencein interfaceBindEvaluatorX- Parameters:
ctx- BindContextcomp- evaluation contextexpression- the expression that will resolve a property- Throws:
XelException
-
newXelContext
protected XelContext newXelContext(BindContext ctx, Component comp)
-
isReadOnly
public boolean isReadOnly(BindContext ctx, Component comp, ExpressionX expression) throws XelException
Description copied from interface:BindEvaluatorXReturns whether the specified expression a read only expression.- Specified by:
isReadOnlyin interfaceBindEvaluatorX- Parameters:
ctx- BindContextcomp- evaluation contextexpression- the expression that will resolve a property- Returns:
- whether the specified expression a read only expression.
- Throws:
XelException
-
-