Class GetAttr
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.GetAttr
- All Implemented Interfaces:
FromSourceLocation
,ToNode
,TypeCheck
A rule-set expression for indexing a record/object or array.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static interface
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescription<R> R
accept
(ExpressionVisitor<R> visitor) Invoke theExpressionVisitor
functions for this expression.static GetAttr.Builder
builder()
Convert this function into a condition.Converts this function into a condition which stores the output in the named result.boolean
getPath()
int
hashCode()
template()
Converts this expression to a string template.toNode()
Converts a value to aNode
.toString()
typeCheckLocal
(Scope<Type> scope) Methods inherited from class software.amazon.smithy.rulesengine.language.syntax.expr.Expression
equal, equal, fromNode, getAttr, getAttr, isSet, isValidHostLabel, isVirtualHostableS3Bucket, literal, not, of, of, of, parseArn, parseShortform, parseUrl, reference, substring, type, typeCheck
Methods inherited from class software.amazon.smithy.rulesengine.language.util.MandatorySourceLocation
getSourceLocation
-
Field Details
-
ID
- See Also:
-
-
Method Details
-
builder
-
evaluate
-
getTarget
-
getPath
-
toString
-
accept
Description copied from class:Expression
Invoke theExpressionVisitor
functions for this expression.- Specified by:
accept
in classExpression
- Type Parameters:
R
- the visitor return type.- Parameters:
visitor
- the visitor to be invoked.- Returns:
- the return value of the visitor.
-
typeCheckLocal
- Specified by:
typeCheckLocal
in classExpression
-
template
Description copied from class:Expression
Converts this expression to a string template. By default this implementation returns aRuntimeException
.- Overrides:
template
in classExpression
- Returns:
- the string template.
-
toNode
Description copied from interface:ToNode
Converts a value to aNode
.- Returns:
- Returns the creates Node.
-
condition
Convert this function into a condition.- Returns:
- the function as a condition.
-
condition
Converts this function into a condition which stores the output in the named result.- Parameters:
result
- the name of the result parameter.- Returns:
- the function as a condition.
-
equals
- Specified by:
equals
in classExpression
-
hashCode
public int hashCode()- Specified by:
hashCode
in classExpression
-