-
public interface FunctionContext
Information about the context in which a function is evaluated. This information is passed to theFunctionTyper
associated with the function to provide information necessary for performing type checks.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
getArgument(int i)
Gets the specified argument.int
getArgumentCount()
Gets the number of arguments passed to the function.ScalarTokenType
getArgumentType(int i)
Gets the datatype of the specified argument.String
getLabel()
Gets the name of the function being evaluated.
-
-
-
Method Detail
-
getLabel
String getLabel()
Gets the name of the function being evaluated.- Returns:
- the name associated with the function
-
getArgumentCount
int getArgumentCount()
Gets the number of arguments passed to the function.- Returns:
- the number of function arguments
-
getArgumentType
ScalarTokenType getArgumentType(int i)
Gets the datatype of the specified argument.In the context passed to
FunctionTyper.computeUpperBound(FunctionContext)
, the returned type is the upper bound on the argument's type.In the context passed to
FunctionTyper.computeResultType(FunctionContext)
, the returned type is the actual type of the argument.- Parameters:
i
- the index of the argument for which to get the type- Returns:
- the type of the argument. If the argument is not a subtype of
ScalarValuedFunction
,null
is returned.
-
getArgument
Object getArgument(int i)
Gets the specified argument.- Parameters:
i
- the index of the argument to get- Returns:
- the argument
-
-