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

AStates.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 AStates extends PStates
{
  private TStates _states_;
  private PIdList _idList_;
  private TSemicolon _semicolon_;

  public AStates()
  {}

  public AStates(
    TStates _states_,
    PIdList _idList_,
    TSemicolon _semicolon_)
  {
    setStates(_states_);

    setIdList(_idList_);

    setSemicolon(_semicolon_);

  }
  public Object clone()
  {
    return new AStates(
             (TStates) cloneNode(_states_),
             (PIdList) cloneNode(_idList_),
             (TSemicolon) cloneNode(_semicolon_));
  }

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

  public TStates getStates()
  {
    return _states_;
  }

  public void setStates(TStates node)
  {
    if(_states_ != null)
    {
      _states_.parent(null);
    }

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

      node.parent(this);
    }

    _states_ = node;
  }

  public PIdList getIdList()
  {
    return _idList_;
  }

  public void setIdList(PIdList node)
  {
    if(_idList_ != null)
    {
      _idList_.parent(null);
    }

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

      node.parent(this);
    }

    _idList_ = node;
  }

  public TSemicolon getSemicolon()
  {
    return _semicolon_;
  }

  public void setSemicolon(TSemicolon node)
  {
    if(_semicolon_ != null)
    {
      _semicolon_.parent(null);
    }

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

      node.parent(this);
    }

    _semicolon_ = node;
  }

  public String toString()
  {
    return ""
           + toString(_states_)
           + toString(_idList_)
           + toString(_semicolon_);
  }

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

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

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

  }

  void replaceChild(Node oldChild, Node newChild)
  {
    if(_states_ == oldChild)
    {
      setStates((TStates) newChild);
      return;
    }

    if(_idList_ == oldChild)
    {
      setIdList((PIdList) newChild);
      return;
    }

    if(_semicolon_ == oldChild)
    {
      setSemicolon((TSemicolon) newChild);
      return;
    }

  }
}

Generated by  Doxygen 1.6.0   Back to index