Package com.sap.cds.ql.cqn
Interface CqnFunc
-
- All Superinterfaces:
CqnToken
,CqnValue
,JSONizable
- All Known Subinterfaces:
BooleanFunction
,CqnContainmentTest
,FunctionCall<T>
public interface CqnFunc extends CqnValue
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
accept(CqnVisitor visitor)
Traverses the expression tree represented by this token with a givenvisitor
.List<CqnValue>
args()
Returns the arguments of this function call.default CqnFunc
asFunction()
Casts this value toCqnFunc
.String
func()
Returns the name of the function to be called.default boolean
isFunction()
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, ofRef, type
-
Methods inherited from interface com.sap.cds.JSONizable
toJson
-
-
-
-
Method Detail
-
func
String func()
Returns the name of the function to be called.- Returns:
- the function name
-
args
List<CqnValue> 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
default CqnFunc asFunction()
Description copied from interface:CqnValue
Casts this value toCqnFunc
.- Specified by:
asFunction
in interfaceCqnValue
- Returns:
- this value as a function
-
accept
default void accept(CqnVisitor visitor)
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
-
-