prerna.sablecc.node.AUseCache Maven / Gradle / Ivy
/* This file was generated by SableCC (http://www.sablecc.org/). */
package prerna.sablecc.node;
import prerna.sablecc.analysis.*;
@SuppressWarnings("nls")
public final class AUseCache extends PUseCache
{
private TDatausecachetoken _datausecachetoken_;
private TLPar _lp_;
private TBoolean _cacheSetting_;
private TRPar _rp_;
public AUseCache()
{
// Constructor
}
public AUseCache(
@SuppressWarnings("hiding") TDatausecachetoken _datausecachetoken_,
@SuppressWarnings("hiding") TLPar _lp_,
@SuppressWarnings("hiding") TBoolean _cacheSetting_,
@SuppressWarnings("hiding") TRPar _rp_)
{
// Constructor
setDatausecachetoken(_datausecachetoken_);
setLp(_lp_);
setCacheSetting(_cacheSetting_);
setRp(_rp_);
}
@Override
public Object clone()
{
return new AUseCache(
cloneNode(this._datausecachetoken_),
cloneNode(this._lp_),
cloneNode(this._cacheSetting_),
cloneNode(this._rp_));
}
@Override
public void apply(Switch sw)
{
((Analysis) sw).caseAUseCache(this);
}
public TDatausecachetoken getDatausecachetoken()
{
return this._datausecachetoken_;
}
public void setDatausecachetoken(TDatausecachetoken node)
{
if(this._datausecachetoken_ != null)
{
this._datausecachetoken_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._datausecachetoken_ = node;
}
public TLPar getLp()
{
return this._lp_;
}
public void setLp(TLPar node)
{
if(this._lp_ != null)
{
this._lp_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._lp_ = node;
}
public TBoolean getCacheSetting()
{
return this._cacheSetting_;
}
public void setCacheSetting(TBoolean node)
{
if(this._cacheSetting_ != null)
{
this._cacheSetting_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._cacheSetting_ = node;
}
public TRPar getRp()
{
return this._rp_;
}
public void setRp(TRPar node)
{
if(this._rp_ != null)
{
this._rp_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._rp_ = node;
}
@Override
public String toString()
{
return ""
+ toString(this._datausecachetoken_)
+ toString(this._lp_)
+ toString(this._cacheSetting_)
+ toString(this._rp_);
}
@Override
void removeChild(@SuppressWarnings("unused") Node child)
{
// Remove child
if(this._datausecachetoken_ == child)
{
this._datausecachetoken_ = null;
return;
}
if(this._lp_ == child)
{
this._lp_ = null;
return;
}
if(this._cacheSetting_ == child)
{
this._cacheSetting_ = null;
return;
}
if(this._rp_ == child)
{
this._rp_ = null;
return;
}
throw new RuntimeException("Not a child.");
}
@Override
void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
{
// Replace child
if(this._datausecachetoken_ == oldChild)
{
setDatausecachetoken((TDatausecachetoken) newChild);
return;
}
if(this._lp_ == oldChild)
{
setLp((TLPar) newChild);
return;
}
if(this._cacheSetting_ == oldChild)
{
setCacheSetting((TBoolean) newChild);
return;
}
if(this._rp_ == oldChild)
{
setRp((TRPar) newChild);
return;
}
throw new RuntimeException("Not a child.");
}
}