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 AOptionalRaisesSection extends POptionalRaisesSection
  {
      private TRaises _raises_;
      private PRaisedExceptionList _raisedExceptionList_;
  
      public AOptionalRaisesSection()
      {
          // Constructor
      }
  
      public AOptionalRaisesSection(
          @SuppressWarnings("hiding") TRaises _raises_,
          @SuppressWarnings("hiding") PRaisedExceptionList _raisedExceptionList_)
      {
          // Constructor
          setRaises(_raises_);
  
          setRaisedExceptionList(_raisedExceptionList_);
  
      }
  
      @Override
      public Object clone()
      {
          return new AOptionalRaisesSection(
              cloneNode(this._raises_),
              cloneNode(this._raisedExceptionList_));
      }
  
      public void apply(Switch sw)
      {
          ((Analysis) sw).caseAOptionalRaisesSection(this);
      }
  
      public TRaises getRaises()
      {
          return this._raises_;
      }
  
      public void setRaises(TRaises node)
      {
          if(this._raises_ != null)
          {
              this._raises_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._raises_ = node;
      }
  
      public PRaisedExceptionList getRaisedExceptionList()
      {
          return this._raisedExceptionList_;
      }
  
      public void setRaisedExceptionList(PRaisedExceptionList node)
      {
          if(this._raisedExceptionList_ != null)
          {
              this._raisedExceptionList_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._raisedExceptionList_ = node;
      }
  
      @Override
      public String toString()
      {
          return ""
              + toString(this._raises_)
              + toString(this._raisedExceptionList_);
      }
  
      @Override
      void removeChild(@SuppressWarnings("unused") Node child)
      {
          // Remove child
          if(this._raises_ == child)
          {
              this._raises_ = null;
              return;
          }
  
          if(this._raisedExceptionList_ == child)
          {
              this._raisedExceptionList_ = null;
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  
      @Override
      void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
      {
          // Replace child
          if(this._raises_ == oldChild)
          {
              setRaises((TRaises) newChild);
              return;
          }
  
          if(this._raisedExceptionList_ == oldChild)
          {
              setRaisedExceptionList((PRaisedExceptionList) newChild);
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  }
  