Class Identifier
- java.lang.Object
-
- software.amazon.smithy.rulesengine.language.syntax.Identifier
-
- All Implemented Interfaces:
FromSourceLocation,ToNode
public final class Identifier extends java.lang.Object implements FromSourceLocation, ToNode
A name used to identify a component of a rule-set.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)StringNodegetName()Gets the name of this identifier.SourceLocationgetSourceLocation()Gets the source location of a value.inthashCode()static Identifierof(java.lang.String name)Creates anIdentifierfrom the given name.static Identifierof(StringNode name)Creates anIdentifierfrom the given name.NodetoNode()Converts a value to aNode.java.lang.StringtoString()
-
-
-
Method Detail
-
of
public static Identifier of(java.lang.String name)
Creates anIdentifierfrom the given name.- Parameters:
name- the name of the identifier to create.- Returns:
- the created Identifier.
-
of
public static Identifier of(StringNode name)
Creates anIdentifierfrom the given name.- Parameters:
name- the name of the identifier to create.- Returns:
- the created Identifier.
-
getSourceLocation
public SourceLocation getSourceLocation()
Description copied from interface:FromSourceLocationGets the source location of a value.- Specified by:
getSourceLocationin interfaceFromSourceLocation- Returns:
- Returns the source location of the value.
-
getName
public StringNode getName()
Gets the name of this identifier.- Returns:
- a node containing the name of the identifier.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-