
prerna.sablecc2.node.APropColDef Maven / Gradle / Ivy
The newest version!
/* This file was generated by SableCC (http://www.sablecc.org/). */
package prerna.sablecc2.node;
import prerna.sablecc2.analysis.*;
@SuppressWarnings("nls")
public final class APropColDef extends PColDef
{
private PProp _prop_;
public APropColDef()
{
// Constructor
}
public APropColDef(
@SuppressWarnings("hiding") PProp _prop_)
{
// Constructor
setProp(_prop_);
}
@Override
public Object clone()
{
return new APropColDef(
cloneNode(this._prop_));
}
@Override
public void apply(Switch sw)
{
((Analysis) sw).caseAPropColDef(this);
}
public PProp getProp()
{
return this._prop_;
}
public void setProp(PProp node)
{
if(this._prop_ != null)
{
this._prop_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._prop_ = node;
}
@Override
public String toString()
{
return ""
+ toString(this._prop_);
}
@Override
void removeChild(@SuppressWarnings("unused") Node child)
{
// Remove child
if(this._prop_ == child)
{
this._prop_ = null;
return;
}
throw new RuntimeException("Not a child.");
}
@Override
void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
{
// Replace child
if(this._prop_ == oldChild)
{
setProp((PProp) newChild);
return;
}
throw new RuntimeException("Not a child.");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy