/* 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 AStrokeCommandParameter extends PCommandParameter { private TStrokewidthToken _strokewidthToken_; private PExpression _expression_; public AStrokeCommandParameter() { // Constructor } public AStrokeCommandParameter( @SuppressWarnings("hiding") TStrokewidthToken _strokewidthToken_, @SuppressWarnings("hiding") PExpression _expression_) { // Constructor setStrokewidthToken(_strokewidthToken_); setExpression(_expression_); } @Override public Object clone() { return new AStrokeCommandParameter( cloneNode(this._strokewidthToken_), cloneNode(this._expression_)); } public void apply(Switch sw) { ((Analysis) sw).caseAStrokeCommandParameter(this); } public TStrokewidthToken getStrokewidthToken() { return this._strokewidthToken_; } public void setStrokewidthToken(TStrokewidthToken node) { if(this._strokewidthToken_ != null) { this._strokewidthToken_.parent(null); } if(node != null) { if(node.parent() != null) { node.parent().removeChild(node); } node.parent(this); } this._strokewidthToken_ = node; } public PExpression getExpression() { return this._expression_; } public void setExpression(PExpression node) { if(this._expression_ != null) { this._expression_.parent(null); } if(node != null) { if(node.parent() != null) { node.parent().removeChild(node); } node.parent(this); } this._expression_ = node; } @Override public String toString() { return "" + toString(this._strokewidthToken_) + toString(this._expression_); } @Override void removeChild(@SuppressWarnings("unused") Node child) { // Remove child if(this._strokewidthToken_ == child) { this._strokewidthToken_ = null; return; } if(this._expression_ == child) { this._expression_ = null; return; } throw new RuntimeException("Not a child."); } @Override void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) { // Replace child if(this._strokewidthToken_ == oldChild) { setStrokewidthToken((TStrokewidthToken) newChild); return; } if(this._expression_ == oldChild) { setExpression((PExpression) newChild); return; } throw new RuntimeException("Not a child."); } }