Class LibraryFunction
java.lang.Object
software.amazon.smithy.rulesengine.language.util.MandatorySourceLocation
software.amazon.smithy.rulesengine.language.syntax.expr.Expression
software.amazon.smithy.rulesengine.language.syntax.fn.Function
software.amazon.smithy.rulesengine.language.syntax.fn.LibraryFunction
- All Implemented Interfaces:
FromSourceLocation
,ToNode
,Into<Condition>
,TypeCheck
A function (
Function
) which is constructed from a FunctionDefinition
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
accept
(ExpressionVisitor<T> visitor) Invoke theExpressionVisitor
functions for this expression.static void
checkTypeSignature
(List<Type> expectedArgs, List<Expression> actualArguments, Scope<Type> scope) static LibraryFunction
ofExpressions
(FunctionDefinition definition, Expression... arguments) Creates a newLibraryFunction
instance with the given arguments.protected Type
typeCheckLocal
(Scope<Type> scope) Methods inherited from class software.amazon.smithy.rulesengine.language.syntax.fn.Function
condition, condition, equals, expectOneArgument, getArguments, getName, getSourceLocation, hashCode, into, toNode, toString
-
Constructor Details
-
LibraryFunction
-
-
Method Details
-
ofExpressions
Creates a newLibraryFunction
instance with the given arguments.- Parameters:
definition
- the function definition.arguments
- the function arguments.- Returns:
- the
LibraryFunction
instance.
-
checkTypeSignature
public static void checkTypeSignature(List<Type> expectedArgs, List<Expression> actualArguments, Scope<Type> scope) throws InnerParseError - Throws:
InnerParseError
-
typeCheckLocal
- Specified by:
typeCheckLocal
in classExpression
-
accept
Description copied from class:Expression
Invoke theExpressionVisitor
functions for this expression.- Specified by:
accept
in classExpression
- Type Parameters:
T
- the visitor return type.- Parameters:
visitor
- the visitor to be invoked.- Returns:
- the return value of the visitor.
-