content: /* This file was generated by SableCC (http://www.sablecc.org/). */
  
  package com.abstratt.mdd.frontend.textuml.grammar.node;
  
  import com.abstratt.mdd.frontend.textuml.grammar.analysis.*;
  
  @SuppressWarnings("nls")
  public final class ALinkSpecificStatement extends PSpecificStatement
  {
      private TLink _link_;
      private PMinimalTypeIdentifier _minimalTypeIdentifier_;
      private TLParen _lParen_;
      private PLinkRole _role1_;
      private TComma _comma_;
      private PLinkRole _role2_;
      private TRParen _rParen_;
  
      public ALinkSpecificStatement()
      {
          // Constructor
      }
  
      public ALinkSpecificStatement(
          @SuppressWarnings("hiding") TLink _link_,
          @SuppressWarnings("hiding") PMinimalTypeIdentifier _minimalTypeIdentifier_,
          @SuppressWarnings("hiding") TLParen _lParen_,
          @SuppressWarnings("hiding") PLinkRole _role1_,
          @SuppressWarnings("hiding") TComma _comma_,
          @SuppressWarnings("hiding") PLinkRole _role2_,
          @SuppressWarnings("hiding") TRParen _rParen_)
      {
          // Constructor
          setLink(_link_);
  
          setMinimalTypeIdentifier(_minimalTypeIdentifier_);
  
          setLParen(_lParen_);
  
          setRole1(_role1_);
  
          setComma(_comma_);
  
          setRole2(_role2_);
  
          setRParen(_rParen_);
  
      }
  
      @Override
      public Object clone()
      {
          return new ALinkSpecificStatement(
              cloneNode(this._link_),
              cloneNode(this._minimalTypeIdentifier_),
              cloneNode(this._lParen_),
              cloneNode(this._role1_),
              cloneNode(this._comma_),
              cloneNode(this._role2_),
              cloneNode(this._rParen_));
      }
  
      public void apply(Switch sw)
      {
          ((Analysis) sw).caseALinkSpecificStatement(this);
      }
  
      public TLink getLink()
      {
          return this._link_;
      }
  
      public void setLink(TLink node)
      {
          if(this._link_ != null)
          {
              this._link_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._link_ = node;
      }
  
      public PMinimalTypeIdentifier getMinimalTypeIdentifier()
      {
          return this._minimalTypeIdentifier_;
      }
  
      public void setMinimalTypeIdentifier(PMinimalTypeIdentifier node)
      {
          if(this._minimalTypeIdentifier_ != null)
          {
              this._minimalTypeIdentifier_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._minimalTypeIdentifier_ = node;
      }
  
      public TLParen getLParen()
      {
          return this._lParen_;
      }
  
      public void setLParen(TLParen node)
      {
          if(this._lParen_ != null)
          {
              this._lParen_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._lParen_ = node;
      }
  
      public PLinkRole getRole1()
      {
          return this._role1_;
      }
  
      public void setRole1(PLinkRole node)
      {
          if(this._role1_ != null)
          {
              this._role1_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._role1_ = node;
      }
  
      public TComma getComma()
      {
          return this._comma_;
      }
  
      public void setComma(TComma node)
      {
          if(this._comma_ != null)
          {
              this._comma_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._comma_ = node;
      }
  
      public PLinkRole getRole2()
      {
          return this._role2_;
      }
  
      public void setRole2(PLinkRole node)
      {
          if(this._role2_ != null)
          {
              this._role2_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._role2_ = node;
      }
  
      public TRParen getRParen()
      {
          return this._rParen_;
      }
  
      public void setRParen(TRParen node)
      {
          if(this._rParen_ != null)
          {
              this._rParen_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._rParen_ = node;
      }
  
      @Override
      public String toString()
      {
          return ""
              + toString(this._link_)
              + toString(this._minimalTypeIdentifier_)
              + toString(this._lParen_)
              + toString(this._role1_)
              + toString(this._comma_)
              + toString(this._role2_)
              + toString(this._rParen_);
      }
  
      @Override
      void removeChild(@SuppressWarnings("unused") Node child)
      {
          // Remove child
          if(this._link_ == child)
          {
              this._link_ = null;
              return;
          }
  
          if(this._minimalTypeIdentifier_ == child)
          {
              this._minimalTypeIdentifier_ = null;
              return;
          }
  
          if(this._lParen_ == child)
          {
              this._lParen_ = null;
              return;
          }
  
          if(this._role1_ == child)
          {
              this._role1_ = null;
              return;
          }
  
          if(this._comma_ == child)
          {
              this._comma_ = null;
              return;
          }
  
          if(this._role2_ == child)
          {
              this._role2_ = null;
              return;
          }
  
          if(this._rParen_ == child)
          {
              this._rParen_ = null;
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  
      @Override
      void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
      {
          // Replace child
          if(this._link_ == oldChild)
          {
              setLink((TLink) newChild);
              return;
          }
  
          if(this._minimalTypeIdentifier_ == oldChild)
          {
              setMinimalTypeIdentifier((PMinimalTypeIdentifier) newChild);
              return;
          }
  
          if(this._lParen_ == oldChild)
          {
              setLParen((TLParen) newChild);
              return;
          }
  
          if(this._role1_ == oldChild)
          {
              setRole1((PLinkRole) newChild);
              return;
          }
  
          if(this._comma_ == oldChild)
          {
              setComma((TComma) newChild);
              return;
          }
  
          if(this._role2_ == oldChild)
          {
              setRole2((PLinkRole) newChild);
              return;
          }
  
          if(this._rParen_ == oldChild)
          {
              setRParen((TRParen) newChild);
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  }
  