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 AImportDecl extends PImportDecl
  {
      private PVisibilityModifier _optionalImportModifier_;
      private TImport _import_;
      private PQualifiedIdentifier _qualifiedIdentifier_;
      private POptionalAlias _optionalAlias_;
      private TSemicolon _semicolon_;
  
      public AImportDecl()
      {
          // Constructor
      }
  
      public AImportDecl(
          @SuppressWarnings("hiding") PVisibilityModifier _optionalImportModifier_,
          @SuppressWarnings("hiding") TImport _import_,
          @SuppressWarnings("hiding") PQualifiedIdentifier _qualifiedIdentifier_,
          @SuppressWarnings("hiding") POptionalAlias _optionalAlias_,
          @SuppressWarnings("hiding") TSemicolon _semicolon_)
      {
          // Constructor
          setOptionalImportModifier(_optionalImportModifier_);
  
          setImport(_import_);
  
          setQualifiedIdentifier(_qualifiedIdentifier_);
  
          setOptionalAlias(_optionalAlias_);
  
          setSemicolon(_semicolon_);
  
      }
  
      @Override
      public Object clone()
      {
          return new AImportDecl(
              cloneNode(this._optionalImportModifier_),
              cloneNode(this._import_),
              cloneNode(this._qualifiedIdentifier_),
              cloneNode(this._optionalAlias_),
              cloneNode(this._semicolon_));
      }
  
      public void apply(Switch sw)
      {
          ((Analysis) sw).caseAImportDecl(this);
      }
  
      public PVisibilityModifier getOptionalImportModifier()
      {
          return this._optionalImportModifier_;
      }
  
      public void setOptionalImportModifier(PVisibilityModifier node)
      {
          if(this._optionalImportModifier_ != null)
          {
              this._optionalImportModifier_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._optionalImportModifier_ = node;
      }
  
      public TImport getImport()
      {
          return this._import_;
      }
  
      public void setImport(TImport node)
      {
          if(this._import_ != null)
          {
              this._import_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._import_ = 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 POptionalAlias getOptionalAlias()
      {
          return this._optionalAlias_;
      }
  
      public void setOptionalAlias(POptionalAlias node)
      {
          if(this._optionalAlias_ != null)
          {
              this._optionalAlias_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._optionalAlias_ = 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._optionalImportModifier_)
              + toString(this._import_)
              + toString(this._qualifiedIdentifier_)
              + toString(this._optionalAlias_)
              + toString(this._semicolon_);
      }
  
      @Override
      void removeChild(@SuppressWarnings("unused") Node child)
      {
          // Remove child
          if(this._optionalImportModifier_ == child)
          {
              this._optionalImportModifier_ = null;
              return;
          }
  
          if(this._import_ == child)
          {
              this._import_ = null;
              return;
          }
  
          if(this._qualifiedIdentifier_ == child)
          {
              this._qualifiedIdentifier_ = null;
              return;
          }
  
          if(this._optionalAlias_ == child)
          {
              this._optionalAlias_ = 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._optionalImportModifier_ == oldChild)
          {
              setOptionalImportModifier((PVisibilityModifier) newChild);
              return;
          }
  
          if(this._import_ == oldChild)
          {
              setImport((TImport) newChild);
              return;
          }
  
          if(this._qualifiedIdentifier_ == oldChild)
          {
              setQualifiedIdentifier((PQualifiedIdentifier) newChild);
              return;
          }
  
          if(this._optionalAlias_ == oldChild)
          {
              setOptionalAlias((POptionalAlias) newChild);
              return;
          }
  
          if(this._semicolon_ == oldChild)
          {
              setSemicolon((TSemicolon) newChild);
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  }
  