Logo Search packages:      
Sourcecode: sablecc version File versions  Download package

AProductionSpecifier.java

/* This file was generated by SableCC (http://www.sablecc.org/). */

package org.sablecc.sablecc.node;

import java.util.*;
import org.sablecc.sablecc.analysis.*;

public final class AProductionSpecifier extends PSpecifier
{
  private TProductionSpecifier _productionSpecifier_;
  private TDot _dot_;

  public AProductionSpecifier()
  {}

  public AProductionSpecifier(
    TProductionSpecifier _productionSpecifier_,
    TDot _dot_)
  {
    setProductionSpecifier(_productionSpecifier_);

    setDot(_dot_);

  }
  public Object clone()
  {
    return new AProductionSpecifier(
             (TProductionSpecifier) cloneNode(_productionSpecifier_),
             (TDot) cloneNode(_dot_));
  }

  public void apply(Switch sw)
  {
    ((Analysis) sw).caseAProductionSpecifier(this);
  }

  public TProductionSpecifier getProductionSpecifier()
  {
    return _productionSpecifier_;
  }

  public void setProductionSpecifier(TProductionSpecifier node)
  {
    if(_productionSpecifier_ != null)
    {
      _productionSpecifier_.parent(null);
    }

    if(node != null)
    {
      if(node.parent() != null)
      {
        node.parent().removeChild(node);
      }

      node.parent(this);
    }

    _productionSpecifier_ = node;
  }

  public TDot getDot()
  {
    return _dot_;
  }

  public void setDot(TDot node)
  {
    if(_dot_ != null)
    {
      _dot_.parent(null);
    }

    if(node != null)
    {
      if(node.parent() != null)
      {
        node.parent().removeChild(node);
      }

      node.parent(this);
    }

    _dot_ = node;
  }

  public String toString()
  {
    return ""
           + toString(_productionSpecifier_)
           + toString(_dot_);
  }

  void removeChild(Node child)
  {
    if(_productionSpecifier_ == child)
    {
      _productionSpecifier_ = null;
      return;
    }

    if(_dot_ == child)
    {
      _dot_ = null;
      return;
    }

  }

  void replaceChild(Node oldChild, Node newChild)
  {
    if(_productionSpecifier_ == oldChild)
    {
      setProductionSpecifier((TProductionSpecifier) newChild);
      return;
    }

    if(_dot_ == oldChild)
    {
      setDot((TDot) newChild);
      return;
    }

  }
}

Generated by  Doxygen 1.6.0   Back to index