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 ALinkRole extends PLinkRole
  {
      private TIdentifier _identifier_;
      private TAssignop _assignop_;
      private PRootExpression _rootExpression_;
  
      public ALinkRole()
      {
          // Constructor
      }
  
      public ALinkRole(
          @SuppressWarnings("hiding") TIdentifier _identifier_,
          @SuppressWarnings("hiding") TAssignop _assignop_,
          @SuppressWarnings("hiding") PRootExpression _rootExpression_)
      {
          // Constructor
          setIdentifier(_identifier_);
  
          setAssignop(_assignop_);
  
          setRootExpression(_rootExpression_);
  
      }
  
      @Override
      public Object clone()
      {
          return new ALinkRole(
              cloneNode(this._identifier_),
              cloneNode(this._assignop_),
              cloneNode(this._rootExpression_));
      }
  
      public void apply(Switch sw)
      {
          ((Analysis) sw).caseALinkRole(this);
      }
  
      public TIdentifier getIdentifier()
      {
          return this._identifier_;
      }
  
      public void setIdentifier(TIdentifier node)
      {
          if(this._identifier_ != null)
          {
              this._identifier_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._identifier_ = node;
      }
  
      public TAssignop getAssignop()
      {
          return this._assignop_;
      }
  
      public void setAssignop(TAssignop node)
      {
          if(this._assignop_ != null)
          {
              this._assignop_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._assignop_ = node;
      }
  
      public PRootExpression getRootExpression()
      {
          return this._rootExpression_;
      }
  
      public void setRootExpression(PRootExpression node)
      {
          if(this._rootExpression_ != null)
          {
              this._rootExpression_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._rootExpression_ = node;
      }
  
      @Override
      public String toString()
      {
          return ""
              + toString(this._identifier_)
              + toString(this._assignop_)
              + toString(this._rootExpression_);
      }
  
      @Override
      void removeChild(@SuppressWarnings("unused") Node child)
      {
          // Remove child
          if(this._identifier_ == child)
          {
              this._identifier_ = null;
              return;
          }
  
          if(this._assignop_ == child)
          {
              this._assignop_ = null;
              return;
          }
  
          if(this._rootExpression_ == child)
          {
              this._rootExpression_ = null;
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  
      @Override
      void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
      {
          // Replace child
          if(this._identifier_ == oldChild)
          {
              setIdentifier((TIdentifier) newChild);
              return;
          }
  
          if(this._assignop_ == oldChild)
          {
              setAssignop((TAssignop) newChild);
              return;
          }
  
          if(this._rootExpression_ == oldChild)
          {
              setRootExpression((PRootExpression) newChild);
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  }
  