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 AStereotypeDefHeader extends PStereotypeDefHeader
  {
      private TAbstract _abstract_;
      private TStereotype _stereotype_;
      private TIdentifier _identifier_;
      private PStereotypeExtendsSection _stereotypeExtendsSection_;
      private PClassSpecializesSection _classSpecializesSection_;
  
      public AStereotypeDefHeader()
      {
          // Constructor
      }
  
      public AStereotypeDefHeader(
          @SuppressWarnings("hiding") TAbstract _abstract_,
          @SuppressWarnings("hiding") TStereotype _stereotype_,
          @SuppressWarnings("hiding") TIdentifier _identifier_,
          @SuppressWarnings("hiding") PStereotypeExtendsSection _stereotypeExtendsSection_,
          @SuppressWarnings("hiding") PClassSpecializesSection _classSpecializesSection_)
      {
          // Constructor
          setAbstract(_abstract_);
  
          setStereotype(_stereotype_);
  
          setIdentifier(_identifier_);
  
          setStereotypeExtendsSection(_stereotypeExtendsSection_);
  
          setClassSpecializesSection(_classSpecializesSection_);
  
      }
  
      @Override
      public Object clone()
      {
          return new AStereotypeDefHeader(
              cloneNode(this._abstract_),
              cloneNode(this._stereotype_),
              cloneNode(this._identifier_),
              cloneNode(this._stereotypeExtendsSection_),
              cloneNode(this._classSpecializesSection_));
      }
  
      public void apply(Switch sw)
      {
          ((Analysis) sw).caseAStereotypeDefHeader(this);
      }
  
      public TAbstract getAbstract()
      {
          return this._abstract_;
      }
  
      public void setAbstract(TAbstract node)
      {
          if(this._abstract_ != null)
          {
              this._abstract_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._abstract_ = node;
      }
  
      public TStereotype getStereotype()
      {
          return this._stereotype_;
      }
  
      public void setStereotype(TStereotype node)
      {
          if(this._stereotype_ != null)
          {
              this._stereotype_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._stereotype_ = 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 PStereotypeExtendsSection getStereotypeExtendsSection()
      {
          return this._stereotypeExtendsSection_;
      }
  
      public void setStereotypeExtendsSection(PStereotypeExtendsSection node)
      {
          if(this._stereotypeExtendsSection_ != null)
          {
              this._stereotypeExtendsSection_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._stereotypeExtendsSection_ = node;
      }
  
      public PClassSpecializesSection getClassSpecializesSection()
      {
          return this._classSpecializesSection_;
      }
  
      public void setClassSpecializesSection(PClassSpecializesSection node)
      {
          if(this._classSpecializesSection_ != null)
          {
              this._classSpecializesSection_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._classSpecializesSection_ = node;
      }
  
      @Override
      public String toString()
      {
          return ""
              + toString(this._abstract_)
              + toString(this._stereotype_)
              + toString(this._identifier_)
              + toString(this._stereotypeExtendsSection_)
              + toString(this._classSpecializesSection_);
      }
  
      @Override
      void removeChild(@SuppressWarnings("unused") Node child)
      {
          // Remove child
          if(this._abstract_ == child)
          {
              this._abstract_ = null;
              return;
          }
  
          if(this._stereotype_ == child)
          {
              this._stereotype_ = null;
              return;
          }
  
          if(this._identifier_ == child)
          {
              this._identifier_ = null;
              return;
          }
  
          if(this._stereotypeExtendsSection_ == child)
          {
              this._stereotypeExtendsSection_ = null;
              return;
          }
  
          if(this._classSpecializesSection_ == child)
          {
              this._classSpecializesSection_ = null;
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  
      @Override
      void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
      {
          // Replace child
          if(this._abstract_ == oldChild)
          {
              setAbstract((TAbstract) newChild);
              return;
          }
  
          if(this._stereotype_ == oldChild)
          {
              setStereotype((TStereotype) newChild);
              return;
          }
  
          if(this._identifier_ == oldChild)
          {
              setIdentifier((TIdentifier) newChild);
              return;
          }
  
          if(this._stereotypeExtendsSection_ == oldChild)
          {
              setStereotypeExtendsSection((PStereotypeExtendsSection) newChild);
              return;
          }
  
          if(this._classSpecializesSection_ == oldChild)
          {
              setClassSpecializesSection((PClassSpecializesSection) newChild);
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  }
  