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 AReceptionDecl extends PReceptionDecl
  {
      private TReception _reception_;
      private TIdentifier _receptionName_;
      private TLParen _lParen_;
      private PSimpleParamDecl _simpleParamDecl_;
      private TRParen _rParen_;
      private TSemicolon _semicolon_;
      private POptionalBehavioralFeatureBody _optionalBehavioralFeatureBody_;
  
      public AReceptionDecl()
      {
          // Constructor
      }
  
      public AReceptionDecl(
          @SuppressWarnings("hiding") TReception _reception_,
          @SuppressWarnings("hiding") TIdentifier _receptionName_,
          @SuppressWarnings("hiding") TLParen _lParen_,
          @SuppressWarnings("hiding") PSimpleParamDecl _simpleParamDecl_,
          @SuppressWarnings("hiding") TRParen _rParen_,
          @SuppressWarnings("hiding") TSemicolon _semicolon_,
          @SuppressWarnings("hiding") POptionalBehavioralFeatureBody _optionalBehavioralFeatureBody_)
      {
          // Constructor
          setReception(_reception_);
  
          setReceptionName(_receptionName_);
  
          setLParen(_lParen_);
  
          setSimpleParamDecl(_simpleParamDecl_);
  
          setRParen(_rParen_);
  
          setSemicolon(_semicolon_);
  
          setOptionalBehavioralFeatureBody(_optionalBehavioralFeatureBody_);
  
      }
  
      @Override
      public Object clone()
      {
          return new AReceptionDecl(
              cloneNode(this._reception_),
              cloneNode(this._receptionName_),
              cloneNode(this._lParen_),
              cloneNode(this._simpleParamDecl_),
              cloneNode(this._rParen_),
              cloneNode(this._semicolon_),
              cloneNode(this._optionalBehavioralFeatureBody_));
      }
  
      public void apply(Switch sw)
      {
          ((Analysis) sw).caseAReceptionDecl(this);
      }
  
      public TReception getReception()
      {
          return this._reception_;
      }
  
      public void setReception(TReception node)
      {
          if(this._reception_ != null)
          {
              this._reception_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._reception_ = node;
      }
  
      public TIdentifier getReceptionName()
      {
          return this._receptionName_;
      }
  
      public void setReceptionName(TIdentifier node)
      {
          if(this._receptionName_ != null)
          {
              this._receptionName_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._receptionName_ = 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 PSimpleParamDecl getSimpleParamDecl()
      {
          return this._simpleParamDecl_;
      }
  
      public void setSimpleParamDecl(PSimpleParamDecl node)
      {
          if(this._simpleParamDecl_ != null)
          {
              this._simpleParamDecl_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._simpleParamDecl_ = 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;
      }
  
      public TSemicolon getSemicolon()
      {
          return this._semicolon_;
      }
  
      public void setSemicolon(TSemicolon node)
      {
          if(this._semicolon_ != null)
          {
              this._semicolon_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._semicolon_ = node;
      }
  
      public POptionalBehavioralFeatureBody getOptionalBehavioralFeatureBody()
      {
          return this._optionalBehavioralFeatureBody_;
      }
  
      public void setOptionalBehavioralFeatureBody(POptionalBehavioralFeatureBody node)
      {
          if(this._optionalBehavioralFeatureBody_ != null)
          {
              this._optionalBehavioralFeatureBody_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._optionalBehavioralFeatureBody_ = node;
      }
  
      @Override
      public String toString()
      {
          return ""
              + toString(this._reception_)
              + toString(this._receptionName_)
              + toString(this._lParen_)
              + toString(this._simpleParamDecl_)
              + toString(this._rParen_)
              + toString(this._semicolon_)
              + toString(this._optionalBehavioralFeatureBody_);
      }
  
      @Override
      void removeChild(@SuppressWarnings("unused") Node child)
      {
          // Remove child
          if(this._reception_ == child)
          {
              this._reception_ = null;
              return;
          }
  
          if(this._receptionName_ == child)
          {
              this._receptionName_ = null;
              return;
          }
  
          if(this._lParen_ == child)
          {
              this._lParen_ = null;
              return;
          }
  
          if(this._simpleParamDecl_ == child)
          {
              this._simpleParamDecl_ = null;
              return;
          }
  
          if(this._rParen_ == child)
          {
              this._rParen_ = null;
              return;
          }
  
          if(this._semicolon_ == child)
          {
              this._semicolon_ = null;
              return;
          }
  
          if(this._optionalBehavioralFeatureBody_ == child)
          {
              this._optionalBehavioralFeatureBody_ = null;
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  
      @Override
      void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
      {
          // Replace child
          if(this._reception_ == oldChild)
          {
              setReception((TReception) newChild);
              return;
          }
  
          if(this._receptionName_ == oldChild)
          {
              setReceptionName((TIdentifier) newChild);
              return;
          }
  
          if(this._lParen_ == oldChild)
          {
              setLParen((TLParen) newChild);
              return;
          }
  
          if(this._simpleParamDecl_ == oldChild)
          {
              setSimpleParamDecl((PSimpleParamDecl) newChild);
              return;
          }
  
          if(this._rParen_ == oldChild)
          {
              setRParen((TRParen) newChild);
              return;
          }
  
          if(this._semicolon_ == oldChild)
          {
              setSemicolon((TSemicolon) newChild);
              return;
          }
  
          if(this._optionalBehavioralFeatureBody_ == oldChild)
          {
              setOptionalBehavioralFeatureBody((POptionalBehavioralFeatureBody) newChild);
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  }
  