Class LibraryFunction
java.lang.Object
software.amazon.smithy.rulesengine.language.syntax.SyntaxElement
software.amazon.smithy.rulesengine.language.syntax.expressions.Expression
software.amazon.smithy.rulesengine.language.syntax.expressions.functions.LibraryFunction
- All Implemented Interfaces:
FromSourceLocation
,ToNode
,TypeCheck
,ToCondition
,ToExpression
- Direct Known Subclasses:
AwsPartition
,BooleanEquals
,GetAttr
,IsSet
,IsValidHostLabel
,IsVirtualHostableS3Bucket
,Not
,ParseArn
,ParseUrl
,StringEquals
,Substring
,UriEncode
A function which is constructed from a
FunctionDefinition
.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
protected Expression
getName()
Returns the name of this function, eg.Gets the source location of a value.int
hashCode()
toNode()
Converts a value to aNode
.toString()
protected Type
typeCheckLocal
(Scope<Type> scope) Methods inherited from class software.amazon.smithy.rulesengine.language.syntax.expressions.Expression
accept, fromNode, getLiteral, getReference, of, of, of, parseShortform, toConditionBuilder, toExpression, type, typeCheck
Methods inherited from class software.amazon.smithy.rulesengine.language.syntax.SyntaxElement
booleanEqual, getAttr, getAttr, isSet, isValidHostLabel, not, parseUrl, stringEqual, substring, template
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.smithy.rulesengine.language.syntax.ToCondition
toCondition, toCondition
-
Field Details
-
definition
-
functionNode
-
-
Constructor Details
-
LibraryFunction
-
-
Method Details
-
getName
Returns the name of this function, eg.isSet
,parseUrl
- Returns:
- The name
-
getArguments
- Returns:
- The arguments to this function
-
expectOneArgument
-
getSourceLocation
Description copied from interface:FromSourceLocation
Gets the source location of a value.- Specified by:
getSourceLocation
in interfaceFromSourceLocation
- Overrides:
getSourceLocation
in classExpression
- Returns:
- Returns the source location of the value.
-
typeCheckLocal
- Specified by:
typeCheckLocal
in classExpression
-
toNode
Description copied from interface:ToNode
Converts a value to aNode
.- Returns:
- Returns the creates Node.
-
equals
- Specified by:
equals
in classExpression
-
hashCode
public int hashCode()- Specified by:
hashCode
in classExpression
-
toString
-