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 ADetachedOperationHeader extends PDetachedOperationHeader
  {
      private TOperation _operation_;
      private PMinimalTypeIdentifier _type_;
      private TDot _dot_;
      private TIdentifier _identifier_;
      private TSemicolon _semicolon_;
  
      public ADetachedOperationHeader()
      {
          // Constructor
      }
  
      public ADetachedOperationHeader(
          @SuppressWarnings("hiding") TOperation _operation_,
          @SuppressWarnings("hiding") PMinimalTypeIdentifier _type_,
          @SuppressWarnings("hiding") TDot _dot_,
          @SuppressWarnings("hiding") TIdentifier _identifier_,
          @SuppressWarnings("hiding") TSemicolon _semicolon_)
      {
          // Constructor
          setOperation(_operation_);
  
          setType(_type_);
  
          setDot(_dot_);
  
          setIdentifier(_identifier_);
  
          setSemicolon(_semicolon_);
  
      }
  
      @Override
      public Object clone()
      {
          return new ADetachedOperationHeader(
              cloneNode(this._operation_),
              cloneNode(this._type_),
              cloneNode(this._dot_),
              cloneNode(this._identifier_),
              cloneNode(this._semicolon_));
      }
  
      public void apply(Switch sw)
      {
          ((Analysis) sw).caseADetachedOperationHeader(this);
      }
  
      public TOperation getOperation()
      {
          return this._operation_;
      }
  
      public void setOperation(TOperation node)
      {
          if(this._operation_ != null)
          {
              this._operation_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._operation_ = node;
      }
  
      public PMinimalTypeIdentifier getType()
      {
          return this._type_;
      }
  
      public void setType(PMinimalTypeIdentifier node)
      {
          if(this._type_ != null)
          {
              this._type_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._type_ = node;
      }
  
      public TDot getDot()
      {
          return this._dot_;
      }
  
      public void setDot(TDot node)
      {
          if(this._dot_ != null)
          {
              this._dot_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._dot_ = node;
      }
  
      public TIdentifier getIdentifier()
      {
          return this._identifier_;
      }
  
      public void setIdentifier(TIdentifier node)
      {
          if(this._identifier_ != null)
          {
              this._identifier_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._identifier_ = 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._operation_)
              + toString(this._type_)
              + toString(this._dot_)
              + toString(this._identifier_)
              + toString(this._semicolon_);
      }
  
      @Override
      void removeChild(@SuppressWarnings("unused") Node child)
      {
          // Remove child
          if(this._operation_ == child)
          {
              this._operation_ = null;
              return;
          }
  
          if(this._type_ == child)
          {
              this._type_ = null;
              return;
          }
  
          if(this._dot_ == child)
          {
              this._dot_ = null;
              return;
          }
  
          if(this._identifier_ == child)
          {
              this._identifier_ = 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._operation_ == oldChild)
          {
              setOperation((TOperation) newChild);
              return;
          }
  
          if(this._type_ == oldChild)
          {
              setType((PMinimalTypeIdentifier) newChild);
              return;
          }
  
          if(this._dot_ == oldChild)
          {
              setDot((TDot) newChild);
              return;
          }
  
          if(this._identifier_ == oldChild)
          {
              setIdentifier((TIdentifier) newChild);
              return;
          }
  
          if(this._semicolon_ == oldChild)
          {
              setSemicolon((TSemicolon) newChild);
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  }
  