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

X2PElem.java

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

package org.sablecc.sablecc.node;

import org.sablecc.sablecc.analysis.*;

public final class X2PElem extends XPElem
{
  private PElem _pElem_;

  public X2PElem()
  {}

  public X2PElem(
    PElem _pElem_)
  {
    setPElem(_pElem_);
  }

  public Object clone()
  {
    throw new RuntimeException("Unsupported Operation");
  }

  public void apply(Switch sw)
  {
    throw new RuntimeException("Switch not supported.");
  }

  public PElem getPElem()
  {
    return _pElem_;
  }

  public void setPElem(PElem node)
  {
    if(_pElem_ != null)
    {
      _pElem_.parent(null);
    }

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

      node.parent(this);
    }

    _pElem_ = node;
  }

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

  void replaceChild(Node oldChild, Node newChild)
  {}

  public String toString()
  {
    return "" +
           toString(_pElem_);
  }
}

Generated by  Doxygen 1.6.0   Back to index