Class GComponent

  • All Implemented Interfaces:
    java.lang.Cloneable, Parser.Symbol

    public class GComponent
    extends ASTNode<ASTNode>
    implements java.lang.Cloneable
    • Field Detail

      • tokenString_Name

        protected java.lang.String tokenString_Name
      • tokenString_Quantifier

        protected java.lang.String tokenString_Quantifier
    • Constructor Detail

      • GComponent

        public GComponent()
      • GComponent

        @Constructor(name={"Name","ActionName","Quantifier"},
                     type={"String","Opt<ActionName>","String"},
                     kind={"Token","Opt","Token"})
        public GComponent​(java.lang.String p0,
                          Opt<ActionName> p1,
                          java.lang.String p2)
    • Method Detail

      • init$Children

        public void init$Children()
        Initializes the child array to the correct size. Initializes List and Opt nta children.
        Overrides:
        init$Children in class ASTNode<ASTNode>
      • clone

        public GComponent clone()
                         throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class ASTNode<ASTNode>
        Throws:
        java.lang.CloneNotSupportedException
      • fullCopy

        @Deprecated
        public GComponent fullCopy()
        Deprecated.
        Please use treeCopy or treeCopyNoTransform instead
        Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
        Overrides:
        fullCopy in class ASTNode<ASTNode>
        Returns:
        dangling copy of the subtree at this node
      • treeCopyNoTransform

        public GComponent treeCopyNoTransform()
        Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
        Overrides:
        treeCopyNoTransform in class ASTNode<ASTNode>
        Returns:
        dangling copy of the subtree at this node
      • treeCopy

        public GComponent treeCopy()
        Create a deep copy of the AST subtree at this node. The subtree of this node is traversed to trigger rewrites before copy. The copy is dangling, i.e. has no parent.
        Overrides:
        treeCopy in class ASTNode<ASTNode>
        Returns:
        dangling copy of the subtree at this node
      • setName

        public void setName​(java.lang.String value)
        Replaces the lexeme Name.
        Parameters:
        value - The new value for the lexeme Name.
      • getName

        @Token(name="Name")
        public java.lang.String getName()
        Retrieves the value for the lexeme Name.
        Returns:
        The value for the lexeme Name.
      • setActionNameOpt

        public void setActionNameOpt​(Opt<ActionName> opt)
        Replaces the optional node for the ActionName child. This is the Opt node containing the child ActionName, not the actual child!
        Parameters:
        opt - The new node to be used as the optional node for the ActionName child.
      • setActionName

        public void setActionName​(ActionName node)
        Replaces the (optional) ActionName child.
        Parameters:
        node - The new node to be used as the ActionName child.
      • hasActionName

        public boolean hasActionName()
        Check whether the optional ActionName child exists.
        Returns:
        true if the optional ActionName child exists, false if it does not.
      • getActionName

        public ActionName getActionName()
        Retrieves the (optional) ActionName child.
        Returns:
        The ActionName child, if it exists. Returns null otherwise.
      • getActionNameOpt

        @OptChild(name="ActionName")
        public Opt<ActionName> getActionNameOpt()
        Retrieves the optional node for the ActionName child. This is the Opt node containing the child ActionName, not the actual child!
        Returns:
        The optional node for child the ActionName child.
      • getActionNameOptNoTransform

        public Opt<ActionName> getActionNameOptNoTransform()
        Retrieves the optional node for child ActionName. This is the Opt node containing the child ActionName, not the actual child!

        This method does not invoke AST transformations.

        Returns:
        The optional node for child ActionName.
      • setQuantifier

        public void setQuantifier​(java.lang.String value)
        Replaces the lexeme Quantifier.
        Parameters:
        value - The new value for the lexeme Quantifier.
      • getQuantifier

        @Token(name="Quantifier")
        public java.lang.String getQuantifier()
        Retrieves the value for the lexeme Quantifier.
        Returns:
        The value for the lexeme Quantifier.