Interface FunctionDefinition
-
- All Known Implementing Classes:
AwsPartition.Definition,BooleanEquals.Definition,GetAttr.Definition,IsSet.Definition,IsValidHostLabel.Definition,IsVirtualHostableS3Bucket.Definition,Not.Definition,ParseArn.Definition,ParseUrl.Definition,StringEquals.Definition,Substring.Definition,UriEncode.Definition
public interface FunctionDefinitionAn abstract definition of a rule-engine function.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LibraryFunctioncreateFunction(FunctionNode functionNode)Creates aLibraryFunctionimplementation from the givenFunctionNode.Valueevaluate(java.util.List<Value> arguments)Evaluate the arguments to a given function to compute a result.java.util.List<Type>getArguments()The arguments to this function.java.lang.StringgetId()The ID of this function.TypegetReturnType()The return type of this function definition.
-
-
-
Method Detail
-
getId
java.lang.String getId()
The ID of this function.- Returns:
- The ID string
-
getArguments
java.util.List<Type> getArguments()
The arguments to this function.- Returns:
- The function arguments
-
getReturnType
Type getReturnType()
The return type of this function definition.- Returns:
- The function return type
-
evaluate
Value evaluate(java.util.List<Value> arguments)
Evaluate the arguments to a given function to compute a result.- Returns:
- The resulting value
-
createFunction
LibraryFunction createFunction(FunctionNode functionNode)
Creates aLibraryFunctionimplementation from the givenFunctionNode.- Parameters:
functionNode- the function node to deserialize.- Returns:
- the created LibraryFunction implementation.
-
-