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 AAssociationDef extends PAssociationDef
  {
      private PAnnotations _annotations_;
      private PAssociationHeader _associationHeader_;
      private PAssociationRoleDeclList _associationRoleDeclList_;
      private TEnd _end_;
      private TSemicolon _semicolon_;
  
      public AAssociationDef()
      {
          // Constructor
      }
  
      public AAssociationDef(
          @SuppressWarnings("hiding") PAnnotations _annotations_,
          @SuppressWarnings("hiding") PAssociationHeader _associationHeader_,
          @SuppressWarnings("hiding") PAssociationRoleDeclList _associationRoleDeclList_,
          @SuppressWarnings("hiding") TEnd _end_,
          @SuppressWarnings("hiding") TSemicolon _semicolon_)
      {
          // Constructor
          setAnnotations(_annotations_);
  
          setAssociationHeader(_associationHeader_);
  
          setAssociationRoleDeclList(_associationRoleDeclList_);
  
          setEnd(_end_);
  
          setSemicolon(_semicolon_);
  
      }
  
      @Override
      public Object clone()
      {
          return new AAssociationDef(
              cloneNode(this._annotations_),
              cloneNode(this._associationHeader_),
              cloneNode(this._associationRoleDeclList_),
              cloneNode(this._end_),
              cloneNode(this._semicolon_));
      }
  
      public void apply(Switch sw)
      {
          ((Analysis) sw).caseAAssociationDef(this);
      }
  
      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 PAssociationHeader getAssociationHeader()
      {
          return this._associationHeader_;
      }
  
      public void setAssociationHeader(PAssociationHeader node)
      {
          if(this._associationHeader_ != null)
          {
              this._associationHeader_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._associationHeader_ = node;
      }
  
      public PAssociationRoleDeclList getAssociationRoleDeclList()
      {
          return this._associationRoleDeclList_;
      }
  
      public void setAssociationRoleDeclList(PAssociationRoleDeclList node)
      {
          if(this._associationRoleDeclList_ != null)
          {
              this._associationRoleDeclList_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._associationRoleDeclList_ = node;
      }
  
      public TEnd getEnd()
      {
          return this._end_;
      }
  
      public void setEnd(TEnd node)
      {
          if(this._end_ != null)
          {
              this._end_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._end_ = 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._annotations_)
              + toString(this._associationHeader_)
              + toString(this._associationRoleDeclList_)
              + toString(this._end_)
              + toString(this._semicolon_);
      }
  
      @Override
      void removeChild(@SuppressWarnings("unused") Node child)
      {
          // Remove child
          if(this._annotations_ == child)
          {
              this._annotations_ = null;
              return;
          }
  
          if(this._associationHeader_ == child)
          {
              this._associationHeader_ = null;
              return;
          }
  
          if(this._associationRoleDeclList_ == child)
          {
              this._associationRoleDeclList_ = null;
              return;
          }
  
          if(this._end_ == child)
          {
              this._end_ = 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._annotations_ == oldChild)
          {
              setAnnotations((PAnnotations) newChild);
              return;
          }
  
          if(this._associationHeader_ == oldChild)
          {
              setAssociationHeader((PAssociationHeader) newChild);
              return;
          }
  
          if(this._associationRoleDeclList_ == oldChild)
          {
              setAssociationRoleDeclList((PAssociationRoleDeclList) newChild);
              return;
          }
  
          if(this._end_ == oldChild)
          {
              setEnd((TEnd) newChild);
              return;
          }
  
          if(this._semicolon_ == oldChild)
          {
              setSemicolon((TSemicolon) newChild);
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  }
  