Package com.sap.cds.ql.cqn
Interface CqnFunc
- All Superinterfaces:
CqnToken
,CqnValue
,JSONizable
- All Known Subinterfaces:
BooleanFunction
,CqnContainmentTest
,FunctionCall<T>
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
accept
(CqnVisitor visitor) Traverses the expression tree represented by this token with a givenvisitor
.args()
Returns the arguments of this function call.default CqnFunc
Casts this value toCqnFunc
.func()
Returns the name of the function to be called.default boolean
Returnstrue
if this is aCqnFunc
.Methods inherited from interface com.sap.cds.ql.cqn.CqnValue
as, asExpression, asList, asLiteral, asNullValue, asParameter, asPlain, asRef, isExpression, isList, isLiteral, isNullValue, isParameter, isPlain, isRef, ofLiteral, ofRef, type
Methods inherited from interface com.sap.cds.JSONizable
toJson
-
Method Details
-
func
String func()Returns the name of the function to be called.- Returns:
- the function name
-
args
Returns the arguments of this function call.- Returns:
- the list of arguments
-
isFunction
default boolean isFunction()Description copied from interface:CqnValue
Returnstrue
if this is aCqnFunc
.- Specified by:
isFunction
in interfaceCqnValue
- Returns:
true
if this is a function, otherwisefalse
-
asFunction
Description copied from interface:CqnValue
Casts this value toCqnFunc
.- Specified by:
asFunction
in interfaceCqnValue
- Returns:
- this value as a function
-
accept
Description copied from interface:CqnToken
Traverses the expression tree represented by this token with a givenvisitor
. The traversal order is depth-first. If this token has child nodes they are traversed first by dispatching the visitor to the children'saccept
methods. Afterwards this token is passed to the visitor'svisit
method specific for this token's type.- Specified by:
accept
in interfaceCqnToken
- Parameters:
visitor
- theCqnVisitor
-