public class MemberExpressionImpl extends Object implements BinaryExpression, MemberExpression
| Constructor and Description |
|---|
MemberExpressionImpl(CommonExpression path,
CommonExpression property) |
| Modifier and Type | Method and Description |
|---|---|
Object |
accept(ExpressionVisitor visitor)
Method
Visitable.accept(ExpressionVisitor) is called when traversing the expression tree. |
EdmType |
getEdmType() |
ExpressionKind |
getKind() |
CommonExpression |
getLeftOperand() |
BinaryOperator |
getOperator() |
CommonExpression |
getPath() |
CommonExpression |
getProperty() |
CommonExpression |
getRightOperand() |
String |
getUriLiteral()
Returns the URI literal which lead to the creation of this expression.
|
CommonExpression |
setEdmType(EdmType edmType)
Set the edmType of this expression node
|
public MemberExpressionImpl(CommonExpression path, CommonExpression property)
public CommonExpression getPath()
getPath in interface MemberExpressionMemberExpression.getPath() is a PropertyExpressionpublic CommonExpression getProperty()
getProperty in interface MemberExpressionMemberExpression.getProperty() is a PropertyExpressionpublic EdmType getEdmType()
getEdmType in interface CommonExpressionCommonExpression.getEdmType() method
for an expression representing the "concat" method will return always
"Edm.String".This type information is set while parsing the $filter or $orderby
expressions and used to do a first validation of the expression.
For calculating operators like "add, sub, mul" this type
information is purely based on input and output types of the
operator as defined in the OData specification.
So for $filter=2 add 7 the CommonExpression.getEdmType() method of the binary expression
will return Edm.Byte and not Edm.Int16 because the parser performs no real
addition.
However, the application may change this type while evaluating the expression tree.
public CommonExpression setEdmType(EdmType edmType)
CommonExpressionsetEdmType in interface CommonExpressionedmType - Type to be setpublic BinaryOperator getOperator()
getOperator in interface BinaryExpressionBinaryOperatorpublic ExpressionKind getKind()
getKind in interface CommonExpressionExpressionKindpublic String getUriLiteral()
CommonExpressiongetUriLiteral in interface CommonExpressionpublic Object accept(ExpressionVisitor visitor) throws ExceptionVisitExpression, ODataApplicationException
VisitableVisitable.accept(ExpressionVisitor) is called when traversing the expression tree. This method is invoked on
each
expression used as node in an expression tree. The implementations should
behave as follows:
ExpressionVisitor instance and provide the stored objects to that
instance
accept in interface Visitablevisitor - Object ( implementing ExpressionVisitor) whose methods are called during traversing a expression node of
the expression tree.ExceptionVisitExpression - Exception occurred the OData library while traversing the treeODataApplicationException - Exception thrown by the application who implemented the visitorpublic CommonExpression getLeftOperand()
getLeftOperand in interface BinaryExpressionpublic CommonExpression getRightOperand()
getRightOperand in interface BinaryExpressionCopyright © 2020. All rights reserved.