/* This file was generated by SableCC (http://www.sablecc.org/). */
package net.sf.jame.contextfree.cfdg.node;
import net.sf.jame.contextfree.cfdg.analysis.*;
@SuppressWarnings("nls")
public final class Start extends Node
{
private PCfdg _pCfdg_;
private EOF _eof_;
public Start()
{
// Empty body
}
public Start(
@SuppressWarnings("hiding") PCfdg _pCfdg_,
@SuppressWarnings("hiding") EOF _eof_)
{
setPCfdg(_pCfdg_);
setEOF(_eof_);
}
@Override
public Object clone()
{
return new Start(
cloneNode(this._pCfdg_),
cloneNode(this._eof_));
}
public void apply(Switch sw)
{
((Analysis) sw).caseStart(this);
}
public PCfdg getPCfdg()
{
return this._pCfdg_;
}
public void setPCfdg(PCfdg node)
{
if(this._pCfdg_ != null)
{
this._pCfdg_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._pCfdg_ = node;
}
public EOF getEOF()
{
return this._eof_;
}
public void setEOF(EOF node)
{
if(this._eof_ != null)
{
this._eof_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._eof_ = node;
}
@Override
void removeChild(Node child)
{
if(this._pCfdg_ == child)
{
this._pCfdg_ = null;
return;
}
if(this._eof_ == child)
{
this._eof_ = null;
return;
}
throw new RuntimeException("Not a child.");
}
@Override
void replaceChild(Node oldChild, Node newChild)
{
if(this._pCfdg_ == oldChild)
{
setPCfdg((PCfdg) newChild);
return;
}
if(this._eof_ == oldChild)
{
setEOF((EOF) newChild);
return;
}
throw new RuntimeException("Not a child.");
}
@Override
public String toString()
{
return "" +
toString(this._pCfdg_) +
toString(this._eof_);
}
}