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 ACatchSection extends PCatchSection
  {
      private TCatch _catch_;
      private TLParen _lParen_;
      private PVarDecl _varDecl_;
      private TRParen _rParen_;
      private PBlockKernel _handlerBlock_;
  
      public ACatchSection()
      {
          // Constructor
      }
  
      public ACatchSection(
          @SuppressWarnings("hiding") TCatch _catch_,
          @SuppressWarnings("hiding") TLParen _lParen_,
          @SuppressWarnings("hiding") PVarDecl _varDecl_,
          @SuppressWarnings("hiding") TRParen _rParen_,
          @SuppressWarnings("hiding") PBlockKernel _handlerBlock_)
      {
          // Constructor
          setCatch(_catch_);
  
          setLParen(_lParen_);
  
          setVarDecl(_varDecl_);
  
          setRParen(_rParen_);
  
          setHandlerBlock(_handlerBlock_);
  
      }
  
      @Override
      public Object clone()
      {
          return new ACatchSection(
              cloneNode(this._catch_),
              cloneNode(this._lParen_),
              cloneNode(this._varDecl_),
              cloneNode(this._rParen_),
              cloneNode(this._handlerBlock_));
      }
  
      public void apply(Switch sw)
      {
          ((Analysis) sw).caseACatchSection(this);
      }
  
      public TCatch getCatch()
      {
          return this._catch_;
      }
  
      public void setCatch(TCatch node)
      {
          if(this._catch_ != null)
          {
              this._catch_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._catch_ = 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 PVarDecl getVarDecl()
      {
          return this._varDecl_;
      }
  
      public void setVarDecl(PVarDecl node)
      {
          if(this._varDecl_ != null)
          {
              this._varDecl_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._varDecl_ = 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 PBlockKernel getHandlerBlock()
      {
          return this._handlerBlock_;
      }
  
      public void setHandlerBlock(PBlockKernel node)
      {
          if(this._handlerBlock_ != null)
          {
              this._handlerBlock_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._handlerBlock_ = node;
      }
  
      @Override
      public String toString()
      {
          return ""
              + toString(this._catch_)
              + toString(this._lParen_)
              + toString(this._varDecl_)
              + toString(this._rParen_)
              + toString(this._handlerBlock_);
      }
  
      @Override
      void removeChild(@SuppressWarnings("unused") Node child)
      {
          // Remove child
          if(this._catch_ == child)
          {
              this._catch_ = null;
              return;
          }
  
          if(this._lParen_ == child)
          {
              this._lParen_ = null;
              return;
          }
  
          if(this._varDecl_ == child)
          {
              this._varDecl_ = null;
              return;
          }
  
          if(this._rParen_ == child)
          {
              this._rParen_ = null;
              return;
          }
  
          if(this._handlerBlock_ == child)
          {
              this._handlerBlock_ = null;
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  
      @Override
      void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
      {
          // Replace child
          if(this._catch_ == oldChild)
          {
              setCatch((TCatch) newChild);
              return;
          }
  
          if(this._lParen_ == oldChild)
          {
              setLParen((TLParen) newChild);
              return;
          }
  
          if(this._varDecl_ == oldChild)
          {
              setVarDecl((PVarDecl) newChild);
              return;
          }
  
          if(this._rParen_ == oldChild)
          {
              setRParen((TRParen) newChild);
              return;
          }
  
          if(this._handlerBlock_ == oldChild)
          {
              setHandlerBlock((PBlockKernel) newChild);
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  }
  