/* 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 AGeometryShapeAdjustment extends PShapeAdjustment
{
private PGeometryAdjustment _geometryAdjustment_;
public AGeometryShapeAdjustment()
{
// Constructor
}
public AGeometryShapeAdjustment(
@SuppressWarnings("hiding") PGeometryAdjustment _geometryAdjustment_)
{
// Constructor
setGeometryAdjustment(_geometryAdjustment_);
}
@Override
public Object clone()
{
return new AGeometryShapeAdjustment(
cloneNode(this._geometryAdjustment_));
}
public void apply(Switch sw)
{
((Analysis) sw).caseAGeometryShapeAdjustment(this);
}
public PGeometryAdjustment getGeometryAdjustment()
{
return this._geometryAdjustment_;
}
public void setGeometryAdjustment(PGeometryAdjustment node)
{
if(this._geometryAdjustment_ != null)
{
this._geometryAdjustment_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._geometryAdjustment_ = node;
}
@Override
public String toString()
{
return ""
+ toString(this._geometryAdjustment_);
}
@Override
void removeChild(@SuppressWarnings("unused") Node child)
{
// Remove child
if(this._geometryAdjustment_ == child)
{
this._geometryAdjustment_ = null;
return;
}
throw new RuntimeException("Not a child.");
}
@Override
void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
{
// Replace child
if(this._geometryAdjustment_ == oldChild)
{
setGeometryAdjustment((PGeometryAdjustment) newChild);
return;
}
throw new RuntimeException("Not a child.");
}
}