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
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(ExpressionVisitor<T> visitor) Invoke theExpressionVisitorfunctions for this expression.static voidcheckTypeSignature(List<Type> expectedArgs, List<Expression> actualArguments, Scope<Type> scope) static LibraryFunctionofExpressions(FunctionDefinition definition, Expression... arguments) Creates a newLibraryFunctioninstance with the given arguments.protected TypetypeCheckLocal(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 newLibraryFunctioninstance with the given arguments.- Parameters:
definition- the function definition.arguments- the function arguments.- Returns:
- the
LibraryFunctioninstance.
-
checkTypeSignature
public static void checkTypeSignature(List<Type> expectedArgs, List<Expression> actualArguments, Scope<Type> scope) throws InnerParseError - Throws:
InnerParseError
-
typeCheckLocal
- Specified by:
typeCheckLocalin classExpression
-
accept
Description copied from class:ExpressionInvoke theExpressionVisitorfunctions for this expression.- Specified by:
acceptin classExpression- Type Parameters:
T- the visitor return type.- Parameters:
visitor- the visitor to be invoked.- Returns:
- the return value of the visitor.
-