/* 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 AArg2Function extends PFunction
{
private TFunctionArg2 _functionArg2_;
private TLRbkt _lRbkt_;
private PFirstExpression _firstExpression_;
private TComma _comma_;
private PSecondExpression _secondExpression_;
private TRRbkt _rRbkt_;
public AArg2Function()
{
// Constructor
}
public AArg2Function(
@SuppressWarnings("hiding") TFunctionArg2 _functionArg2_,
@SuppressWarnings("hiding") TLRbkt _lRbkt_,
@SuppressWarnings("hiding") PFirstExpression _firstExpression_,
@SuppressWarnings("hiding") TComma _comma_,
@SuppressWarnings("hiding") PSecondExpression _secondExpression_,
@SuppressWarnings("hiding") TRRbkt _rRbkt_)
{
// Constructor
setFunctionArg2(_functionArg2_);
setLRbkt(_lRbkt_);
setFirstExpression(_firstExpression_);
setComma(_comma_);
setSecondExpression(_secondExpression_);
setRRbkt(_rRbkt_);
}
@Override
public Object clone()
{
return new AArg2Function(
cloneNode(this._functionArg2_),
cloneNode(this._lRbkt_),
cloneNode(this._firstExpression_),
cloneNode(this._comma_),
cloneNode(this._secondExpression_),
cloneNode(this._rRbkt_));
}
public void apply(Switch sw)
{
((Analysis) sw).caseAArg2Function(this);
}
public TFunctionArg2 getFunctionArg2()
{
return this._functionArg2_;
}
public void setFunctionArg2(TFunctionArg2 node)
{
if(this._functionArg2_ != null)
{
this._functionArg2_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._functionArg2_ = node;
}
public TLRbkt getLRbkt()
{
return this._lRbkt_;
}
public void setLRbkt(TLRbkt node)
{
if(this._lRbkt_ != null)
{
this._lRbkt_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._lRbkt_ = node;
}
public PFirstExpression getFirstExpression()
{
return this._firstExpression_;
}
public void setFirstExpression(PFirstExpression node)
{
if(this._firstExpression_ != null)
{
this._firstExpression_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._firstExpression_ = node;
}
public TComma getComma()
{
return this._comma_;
}
public void setComma(TComma node)
{
if(this._comma_ != null)
{
this._comma_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._comma_ = node;
}
public PSecondExpression getSecondExpression()
{
return this._secondExpression_;
}
public void setSecondExpression(PSecondExpression node)
{
if(this._secondExpression_ != null)
{
this._secondExpression_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._secondExpression_ = node;
}
public TRRbkt getRRbkt()
{
return this._rRbkt_;
}
public void setRRbkt(TRRbkt node)
{
if(this._rRbkt_ != null)
{
this._rRbkt_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._rRbkt_ = node;
}
@Override
public String toString()
{
return ""
+ toString(this._functionArg2_)
+ toString(this._lRbkt_)
+ toString(this._firstExpression_)
+ toString(this._comma_)
+ toString(this._secondExpression_)
+ toString(this._rRbkt_);
}
@Override
void removeChild(@SuppressWarnings("unused") Node child)
{
// Remove child
if(this._functionArg2_ == child)
{
this._functionArg2_ = null;
return;
}
if(this._lRbkt_ == child)
{
this._lRbkt_ = null;
return;
}
if(this._firstExpression_ == child)
{
this._firstExpression_ = null;
return;
}
if(this._comma_ == child)
{
this._comma_ = null;
return;
}
if(this._secondExpression_ == child)
{
this._secondExpression_ = null;
return;
}
if(this._rRbkt_ == child)
{
this._rRbkt_ = null;
return;
}
throw new RuntimeException("Not a child.");
}
@Override
void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
{
// Replace child
if(this._functionArg2_ == oldChild)
{
setFunctionArg2((TFunctionArg2) newChild);
return;
}
if(this._lRbkt_ == oldChild)
{
setLRbkt((TLRbkt) newChild);
return;
}
if(this._firstExpression_ == oldChild)
{
setFirstExpression((PFirstExpression) newChild);
return;
}
if(this._comma_ == oldChild)
{
setComma((TComma) newChild);
return;
}
if(this._secondExpression_ == oldChild)
{
setSecondExpression((PSecondExpression) newChild);
return;
}
if(this._rRbkt_ == oldChild)
{
setRRbkt((TRRbkt) newChild);
return;
}
throw new RuntimeException("Not a child.");
}
}