java.lang.Object
software.amazon.smithy.rulesengine.language.syntax.Identifier
All Implemented Interfaces:
FromSourceLocation, ToNode

public final class Identifier extends Object implements FromSourceLocation, ToNode
A name used to identify a component of a rule-set.
  • Method Details

    • of

      public static Identifier of(String name)
      Creates an Identifier 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 an Identifier 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 interface FromSourceLocation
      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.
    • toNode

      public Node toNode()
      Description copied from interface: ToNode
      Converts a value to a Node.
      Specified by:
      toNode in interface ToNode
      Returns:
      Returns the creates Node.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object