Class Reference
- java.lang.Object
-
- software.amazon.smithy.rulesengine.language.util.MandatorySourceLocation
-
- software.amazon.smithy.rulesengine.language.syntax.expr.Expression
-
- software.amazon.smithy.rulesengine.language.syntax.expr.Reference
-
- All Implemented Interfaces:
FromSourceLocation,ToNode,TypeCheck
public final class Reference extends Expression
A reference to a field.
-
-
Constructor Summary
Constructors Constructor Description Reference(Identifier name, FromSourceLocation sourceLocation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> Raccept(ExpressionVisitor<R> visitor)Invoke theExpressionVisitorfunctions for this expression.booleanequals(java.lang.Object o)IdentifiergetName()inthashCode()java.lang.Stringtemplate()Converts this expression to a string template.NodetoNode()Converts a value to aNode.java.lang.StringtoString()TypetypeCheckLocal(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
-
-
-
-
Constructor Detail
-
Reference
public Reference(Identifier name, FromSourceLocation sourceLocation)
-
-
Method Detail
-
accept
public <R> R accept(ExpressionVisitor<R> visitor)
Description copied from class:ExpressionInvoke theExpressionVisitorfunctions for this expression.- Specified by:
acceptin classExpression- Type Parameters:
R- the visitor return type.- Parameters:
visitor- the visitor to be invoked.- Returns:
- the return value of the visitor.
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equalsin classExpression
-
hashCode
public int hashCode()
- Specified by:
hashCodein classExpression
-
typeCheckLocal
public Type typeCheckLocal(Scope<Type> scope)
- Specified by:
typeCheckLocalin classExpression
-
template
public java.lang.String template()
Description copied from class:ExpressionConverts this expression to a string template. By default this implementation returns aRuntimeException.- Overrides:
templatein classExpression- Returns:
- the string template.
-
getName
public Identifier getName()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-