Class GetAttr
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
software.amazon.smithy.rulesengine.language.syntax.expressions.functions.GetAttr
- All Implemented Interfaces:
- FromSourceLocation,- ToNode,- TypeCheck,- ToCondition,- ToExpression
A rule-set expression for indexing a record/object or array.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final classAFunctionDefinitionfor theGetAttrfunction.static interface
- 
Field SummaryFieldsFields inherited from class software.amazon.smithy.rulesengine.language.syntax.expressions.functions.LibraryFunctiondefinition, functionNode
- 
Method SummaryModifier and TypeMethodDescription<R> Raccept(ExpressionVisitor<R> visitor) Invoke theExpressionVisitorfunctions for this expression.booleanGets the value at the defined path out of the target value.static GetAttr.DefinitionGets theFunctionDefinitionimplementation.getPath()Gets the list ofGetAttr.Parts that make up the path to the requested attribute.Gets the expression to retrieve an attribute of.inthashCode()static GetAttrofExpressions(ToExpression arg1, String arg2) Creates aGetAttrfunction from the given expressions.static GetAttrofExpressions(ToExpression arg1, ToExpression arg2) Creates aGetAttrfunction from the given expressions.template()Converts this expression to a string template.toNode()Converts a value to aNode.toString()protected TypetypeCheckLocal(Scope<Type> scope) Methods inherited from class software.amazon.smithy.rulesengine.language.syntax.expressions.functions.LibraryFunctionexpectOneArgument, getArguments, getName, getSourceLocationMethods inherited from class software.amazon.smithy.rulesengine.language.syntax.expressions.ExpressionfromNode, getLiteral, getReference, of, of, of, parseShortform, toConditionBuilder, toExpression, type, typeCheckMethods inherited from class software.amazon.smithy.rulesengine.language.syntax.SyntaxElementbooleanEqual, getAttr, getAttr, isSet, isValidHostLabel, not, parseUrl, stringEqual, substringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.smithy.rulesengine.language.syntax.ToConditiontoCondition, toCondition
- 
Field Details- 
ID- See Also:
 
 
- 
- 
Method Details- 
getDefinitionGets theFunctionDefinitionimplementation.- Returns:
- the function definition.
 
- 
ofExpressionsCreates aGetAttrfunction from the given expressions.- Parameters:
- arg1- the argument to extract from.
- arg2- the path to extract.
- Returns:
- The resulting GetAttrfunction.
 
- 
ofExpressionsCreates aGetAttrfunction from the given expressions.- Parameters:
- arg1- the argument to extract from.
- arg2- the path to extract.
- Returns:
- The resulting GetAttrfunction.
 
- 
evaluateGets the value at the defined path out of the target value.- Parameters:
- target- the target value to retrieve a value out of.
- Returns:
- the retrieve value.
 
- 
getTargetGets the expression to retrieve an attribute of.- Returns:
- the expression targeted by this function.
 
- 
getPathGets the list ofGetAttr.Parts that make up the path to the requested attribute.- Returns:
- the list of path parts to the requested attribute.
 
- 
acceptDescription copied from class:ExpressionInvoke theExpressionVisitorfunctions for this expression.- Specified by:
- acceptin class- Expression
- Type Parameters:
- R- the visitor return type.
- Parameters:
- visitor- the visitor to be invoked.
- Returns:
- the return value of the visitor.
 
- 
typeCheckLocal- Overrides:
- typeCheckLocalin class- LibraryFunction
 
- 
templateDescription copied from class:SyntaxElementConverts this expression to a string template. By default, this implementation returns aRuntimeException.- Overrides:
- templatein class- SyntaxElement
- Returns:
- the String template.
 
- 
toNodeDescription copied from interface:ToNodeConverts a value to aNode.- Specified by:
- toNodein interface- ToNode
- Overrides:
- toNodein class- LibraryFunction
- Returns:
- Returns the creates Node.
 
- 
equals- Overrides:
- equalsin class- LibraryFunction
 
- 
hashCodepublic int hashCode()- Overrides:
- hashCodein class- LibraryFunction
 
- 
toString- Overrides:
- toStringin class- LibraryFunction
 
 
-