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 ADependencyDecl extends PDependencyDecl
  {
      private TDependency _dependency_;
      private PTypeIdentifier _typeIdentifier_;
      private TSemicolon _semicolon_;
  
      public ADependencyDecl()
      {
          // Constructor
      }
  
      public ADependencyDecl(
          @SuppressWarnings("hiding") TDependency _dependency_,
          @SuppressWarnings("hiding") PTypeIdentifier _typeIdentifier_,
          @SuppressWarnings("hiding") TSemicolon _semicolon_)
      {
          // Constructor
          setDependency(_dependency_);
  
          setTypeIdentifier(_typeIdentifier_);
  
          setSemicolon(_semicolon_);
  
      }
  
      @Override
      public Object clone()
      {
          return new ADependencyDecl(
              cloneNode(this._dependency_),
              cloneNode(this._typeIdentifier_),
              cloneNode(this._semicolon_));
      }
  
      public void apply(Switch sw)
      {
          ((Analysis) sw).caseADependencyDecl(this);
      }
  
      public TDependency getDependency()
      {
          return this._dependency_;
      }
  
      public void setDependency(TDependency node)
      {
          if(this._dependency_ != null)
          {
              this._dependency_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._dependency_ = node;
      }
  
      public PTypeIdentifier getTypeIdentifier()
      {
          return this._typeIdentifier_;
      }
  
      public void setTypeIdentifier(PTypeIdentifier node)
      {
          if(this._typeIdentifier_ != null)
          {
              this._typeIdentifier_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._typeIdentifier_ = 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;
      }
  
      @Override
      public String toString()
      {
          return ""
              + toString(this._dependency_)
              + toString(this._typeIdentifier_)
              + toString(this._semicolon_);
      }
  
      @Override
      void removeChild(@SuppressWarnings("unused") Node child)
      {
          // Remove child
          if(this._dependency_ == child)
          {
              this._dependency_ = null;
              return;
          }
  
          if(this._typeIdentifier_ == child)
          {
              this._typeIdentifier_ = null;
              return;
          }
  
          if(this._semicolon_ == child)
          {
              this._semicolon_ = null;
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  
      @Override
      void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
      {
          // Replace child
          if(this._dependency_ == oldChild)
          {
              setDependency((TDependency) newChild);
              return;
          }
  
          if(this._typeIdentifier_ == oldChild)
          {
              setTypeIdentifier((PTypeIdentifier) newChild);
              return;
          }
  
          if(this._semicolon_ == oldChild)
          {
              setSemicolon((TSemicolon) newChild);
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  }
  