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 boolean
equals(java.lang.Object obj)
StringNode
getName()
Gets the name of this identifier.SourceLocation
getSourceLocation()
Gets the source location of a value.int
hashCode()
static Identifier
of(java.lang.String name)
Creates anIdentifier
from the given name.static Identifier
of(StringNode name)
Creates anIdentifier
from the given name.Node
toNode()
Converts a value to aNode
.java.lang.String
toString()
-
-
-
Method Detail
-
of
public static Identifier of(java.lang.String name)
Creates anIdentifier
from the given name.- Parameters:
name
- the name of the identifier to create.- Returns:
- the created Identifier.
-
of
public static Identifier of(StringNode name)
Creates anIdentifier
from the given name.- Parameters:
name
- the name of the identifier to create.- Returns:
- the created Identifier.
-
getSourceLocation
public SourceLocation getSourceLocation()
Description copied from interface:FromSourceLocation
Gets the source location of a value.- Specified by:
getSourceLocation
in 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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-