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 ALinkIdentifierExpression extends PIdentifierExpression
  {
      private PIdentifierExpression _identifierExpression_;
      private PAssociationTraversal _associationTraversal_;
  
      public ALinkIdentifierExpression()
      {
          // Constructor
      }
  
      public ALinkIdentifierExpression(
          @SuppressWarnings("hiding") PIdentifierExpression _identifierExpression_,
          @SuppressWarnings("hiding") PAssociationTraversal _associationTraversal_)
      {
          // Constructor
          setIdentifierExpression(_identifierExpression_);
  
          setAssociationTraversal(_associationTraversal_);
  
      }
  
      @Override
      public Object clone()
      {
          return new ALinkIdentifierExpression(
              cloneNode(this._identifierExpression_),
              cloneNode(this._associationTraversal_));
      }
  
      public void apply(Switch sw)
      {
          ((Analysis) sw).caseALinkIdentifierExpression(this);
      }
  
      public PIdentifierExpression getIdentifierExpression()
      {
          return this._identifierExpression_;
      }
  
      public void setIdentifierExpression(PIdentifierExpression node)
      {
          if(this._identifierExpression_ != null)
          {
              this._identifierExpression_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._identifierExpression_ = node;
      }
  
      public PAssociationTraversal getAssociationTraversal()
      {
          return this._associationTraversal_;
      }
  
      public void setAssociationTraversal(PAssociationTraversal node)
      {
          if(this._associationTraversal_ != null)
          {
              this._associationTraversal_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._associationTraversal_ = node;
      }
  
      @Override
      public String toString()
      {
          return ""
              + toString(this._identifierExpression_)
              + toString(this._associationTraversal_);
      }
  
      @Override
      void removeChild(@SuppressWarnings("unused") Node child)
      {
          // Remove child
          if(this._identifierExpression_ == child)
          {
              this._identifierExpression_ = null;
              return;
          }
  
          if(this._associationTraversal_ == child)
          {
              this._associationTraversal_ = null;
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  
      @Override
      void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
      {
          // Replace child
          if(this._identifierExpression_ == oldChild)
          {
              setIdentifierExpression((PIdentifierExpression) newChild);
              return;
          }
  
          if(this._associationTraversal_ == oldChild)
          {
              setAssociationTraversal((PAssociationTraversal) newChild);
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  }
  