Class PropertyExpression

  • All Implemented Interfaces:
    java.io.Serializable, Expression, ExpressionX

    public class PropertyExpression
    extends java.lang.Object
    implements ExpressionX, java.io.Serializable
    An implementation of component property expression to evaluate it with a reflection method call instead of EL resolving.

    Note that this class is used for Data Binding internal only

    Since:
    8.0.0
    Author:
    jumperchen
    See Also:
    Serialized Form
    • Constructor Detail

      • PropertyExpression

        public PropertyExpression​(Component cmp,
                                  java.lang.String field)
    • Method Detail

      • isReadOnly

        public boolean isReadOnly​(XelContext ctx)
                           throws XelException
        Description copied from interface: ExpressionX
        Returns whether this is a read only (cannot setValue) expression.
        Specified by:
        isReadOnly in interface ExpressionX
        Parameters:
        ctx - the evaluation context
        Returns:
        whether this is a read only (cannot setValue) expression.
        Throws:
        XelException
      • setValue

        public void setValue​(XelContext ctx,
                             java.lang.Object value)
                      throws XelException
        Description copied from interface: ExpressionX
        Set values into the property resolved by this expression.
        Specified by:
        setValue in interface ExpressionX
        Parameters:
        ctx - the evaluation context
        value - the value to be set into the property resolved by this expression
        Throws:
        XelException
      • getExpressionString

        public java.lang.String getExpressionString()
        Description copied from interface: ExpressionX
        Returns the expression in String form.
        Specified by:
        getExpressionString in interface ExpressionX
        Returns:
        the expression in String form.
      • getType

        public java.lang.Class getType​(XelContext xelc)
        Description copied from interface: ExpressionX
        Returns the result type of this expression.
        Specified by:
        getType in interface ExpressionX
        Parameters:
        xelc - the evaluation context
        Returns:
        the result type of this expression.
      • getValueReference

        public ValueReference getValueReference​(XelContext xelc)
        Description copied from interface: ExpressionX
        Returns the target bean and field name of this expression.
        Specified by:
        getValueReference in interface ExpressionX
        Parameters:
        xelc - the evaluation context
        Returns:
        the target bean and field name of this expression.