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 AAssociationRoleDecl extends PAssociationRoleDecl
  {
      private TModelComment _modelComment_;
      private PAnnotations _annotations_;
      private PAssociationModifiers _associationModifiers_;
      private PAssociationEnd _associationEnd_;
      private TSemicolon _semicolon_;
  
      public AAssociationRoleDecl()
      {
          // Constructor
      }
  
      public AAssociationRoleDecl(
          @SuppressWarnings("hiding") TModelComment _modelComment_,
          @SuppressWarnings("hiding") PAnnotations _annotations_,
          @SuppressWarnings("hiding") PAssociationModifiers _associationModifiers_,
          @SuppressWarnings("hiding") PAssociationEnd _associationEnd_,
          @SuppressWarnings("hiding") TSemicolon _semicolon_)
      {
          // Constructor
          setModelComment(_modelComment_);
  
          setAnnotations(_annotations_);
  
          setAssociationModifiers(_associationModifiers_);
  
          setAssociationEnd(_associationEnd_);
  
          setSemicolon(_semicolon_);
  
      }
  
      @Override
      public Object clone()
      {
          return new AAssociationRoleDecl(
              cloneNode(this._modelComment_),
              cloneNode(this._annotations_),
              cloneNode(this._associationModifiers_),
              cloneNode(this._associationEnd_),
              cloneNode(this._semicolon_));
      }
  
      public void apply(Switch sw)
      {
          ((Analysis) sw).caseAAssociationRoleDecl(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 PAssociationModifiers getAssociationModifiers()
      {
          return this._associationModifiers_;
      }
  
      public void setAssociationModifiers(PAssociationModifiers node)
      {
          if(this._associationModifiers_ != null)
          {
              this._associationModifiers_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._associationModifiers_ = node;
      }
  
      public PAssociationEnd getAssociationEnd()
      {
          return this._associationEnd_;
      }
  
      public void setAssociationEnd(PAssociationEnd node)
      {
          if(this._associationEnd_ != null)
          {
              this._associationEnd_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._associationEnd_ = 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._associationModifiers_)
              + toString(this._associationEnd_)
              + 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._associationModifiers_ == child)
          {
              this._associationModifiers_ = null;
              return;
          }
  
          if(this._associationEnd_ == child)
          {
              this._associationEnd_ = 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._associationModifiers_ == oldChild)
          {
              setAssociationModifiers((PAssociationModifiers) newChild);
              return;
          }
  
          if(this._associationEnd_ == oldChild)
          {
              setAssociationEnd((PAssociationEnd) newChild);
              return;
          }
  
          if(this._semicolon_ == oldChild)
          {
              setSemicolon((TSemicolon) newChild);
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  }
  