Class StructDeclaration.Member

java.lang.Object
nz.org.riskscape.rl.ast.StructDeclaration.Member
Enclosing class:
StructDeclaration

public static class StructDeclaration.Member extends Object
  • Method Details

    • getName

      public Optional<String> getName()
      Returns:
      the declared name of this attribute, or empty if the name was left off
    • getAttributeName

      @Deprecated public String getAttributeName()
      Deprecated.
      use getMemberName instead - the AST is no longer responsible for supplying a default member name to use when the user doesn't supply one
    • appendSource

      public void appendSource(StringBuilder appendTo)
    • cloneWithExpression

      public StructDeclaration.Member cloneWithExpression(Expression newExpression)
      Returns:
      an AttrDeclaration of the same type and the same identifier but a new expression.
    • toSource

      public String toSource()
    • isAnonymous

      public boolean isAnonymous()
      Returns:
      true if this member has no identifier, i.e. the name should be inferred during realization
    • isSQLStyle

      public boolean isSQLStyle()
      Returns:
      true if the member's name was declared with an as, e.g. foo as bar
    • isJSONStyle

      public boolean isJSONStyle()
      Returns:
      true if the member's name was declared with a colon, e.g. bar: foo
    • getIdentifier

      @Nullable public Token getIdentifier()
    • getExpression

      public Expression getExpression()
    • isSelectAll

      public boolean isSelectAll()

      true if the member is a vanilla select-all operator, e.g. {foo, *, bar}

    • isSelectAllOnReceiver

      public boolean isSelectAllOnReceiver()

      true if the member has a trailing select-all operator, e.g. {foo, bar.*, baz}

    • getAs

      @Nullable public Token getAs()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object