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 AConstraintException extends PConstraintException
  {
      private TRaises _raises_;
      private PQualifiedIdentifier _exception_;
  
      public AConstraintException()
      {
          // Constructor
      }
  
      public AConstraintException(
          @SuppressWarnings("hiding") TRaises _raises_,
          @SuppressWarnings("hiding") PQualifiedIdentifier _exception_)
      {
          // Constructor
          setRaises(_raises_);
  
          setException(_exception_);
  
      }
  
      @Override
      public Object clone()
      {
          return new AConstraintException(
              cloneNode(this._raises_),
              cloneNode(this._exception_));
      }
  
      public void apply(Switch sw)
      {
          ((Analysis) sw).caseAConstraintException(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 PQualifiedIdentifier getException()
      {
          return this._exception_;
      }
  
      public void setException(PQualifiedIdentifier node)
      {
          if(this._exception_ != null)
          {
              this._exception_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._exception_ = node;
      }
  
      @Override
      public String toString()
      {
          return ""
              + toString(this._raises_)
              + toString(this._exception_);
      }
  
      @Override
      void removeChild(@SuppressWarnings("unused") Node child)
      {
          // Remove child
          if(this._raises_ == child)
          {
              this._raises_ = null;
              return;
          }
  
          if(this._exception_ == child)
          {
              this._exception_ = 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._exception_ == oldChild)
          {
              setException((PQualifiedIdentifier) newChild);
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  }
  