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 APackageHeading extends PPackageHeading
  {
      private TModelComment _modelComment_;
      private PAnnotations _annotations_;
      private PPackageType _packageType_;
      private PQualifiedIdentifier _qualifiedIdentifier_;
      private TSemicolon _semicolon_;
  
      public APackageHeading()
      {
          // Constructor
      }
  
      public APackageHeading(
          @SuppressWarnings("hiding") TModelComment _modelComment_,
          @SuppressWarnings("hiding") PAnnotations _annotations_,
          @SuppressWarnings("hiding") PPackageType _packageType_,
          @SuppressWarnings("hiding") PQualifiedIdentifier _qualifiedIdentifier_,
          @SuppressWarnings("hiding") TSemicolon _semicolon_)
      {
          // Constructor
          setModelComment(_modelComment_);
  
          setAnnotations(_annotations_);
  
          setPackageType(_packageType_);
  
          setQualifiedIdentifier(_qualifiedIdentifier_);
  
          setSemicolon(_semicolon_);
  
      }
  
      @Override
      public Object clone()
      {
          return new APackageHeading(
              cloneNode(this._modelComment_),
              cloneNode(this._annotations_),
              cloneNode(this._packageType_),
              cloneNode(this._qualifiedIdentifier_),
              cloneNode(this._semicolon_));
      }
  
      public void apply(Switch sw)
      {
          ((Analysis) sw).caseAPackageHeading(this);
      }
  
      public TModelComment getModelComment()
      {
          return this._modelComment_;
      }
  
      public void setModelComment(TModelComment node)
      {
          if(this._modelComment_ != null)
          {
              this._modelComment_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._modelComment_ = node;
      }
  
      public PAnnotations getAnnotations()
      {
          return this._annotations_;
      }
  
      public void setAnnotations(PAnnotations node)
      {
          if(this._annotations_ != null)
          {
              this._annotations_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._annotations_ = node;
      }
  
      public PPackageType getPackageType()
      {
          return this._packageType_;
      }
  
      public void setPackageType(PPackageType node)
      {
          if(this._packageType_ != null)
          {
              this._packageType_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._packageType_ = node;
      }
  
      public PQualifiedIdentifier getQualifiedIdentifier()
      {
          return this._qualifiedIdentifier_;
      }
  
      public void setQualifiedIdentifier(PQualifiedIdentifier node)
      {
          if(this._qualifiedIdentifier_ != null)
          {
              this._qualifiedIdentifier_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._qualifiedIdentifier_ = 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._modelComment_)
              + toString(this._annotations_)
              + toString(this._packageType_)
              + toString(this._qualifiedIdentifier_)
              + toString(this._semicolon_);
      }
  
      @Override
      void removeChild(@SuppressWarnings("unused") Node child)
      {
          // Remove child
          if(this._modelComment_ == child)
          {
              this._modelComment_ = null;
              return;
          }
  
          if(this._annotations_ == child)
          {
              this._annotations_ = null;
              return;
          }
  
          if(this._packageType_ == child)
          {
              this._packageType_ = null;
              return;
          }
  
          if(this._qualifiedIdentifier_ == child)
          {
              this._qualifiedIdentifier_ = 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._modelComment_ == oldChild)
          {
              setModelComment((TModelComment) newChild);
              return;
          }
  
          if(this._annotations_ == oldChild)
          {
              setAnnotations((PAnnotations) newChild);
              return;
          }
  
          if(this._packageType_ == oldChild)
          {
              setPackageType((PPackageType) newChild);
              return;
          }
  
          if(this._qualifiedIdentifier_ == oldChild)
          {
              setQualifiedIdentifier((PQualifiedIdentifier) newChild);
              return;
          }
  
          if(this._semicolon_ == oldChild)
          {
              setSemicolon((TSemicolon) newChild);
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  }
  