/* This file was generated by SableCC (http://www.sablecc.org/). */ package org.uva.student.calinwouter.qlqls.generated.node; import org.uva.student.calinwouter.qlqls.generated.analysis.*; @SuppressWarnings("nls") public final class ATypeElement extends PElement { private PType _type_; public ATypeElement() { // Constructor } public ATypeElement( @SuppressWarnings("hiding") PType _type_) { // Constructor setType(_type_); } @Override public Object clone() { return new ATypeElement( cloneNode(this._type_)); } @Override public void apply(Switch sw) { ((Analysis) sw).caseATypeElement(this); } public PType getType() { return this._type_; } public void setType(PType node) { if(this._type_ != null) { this._type_.parent(null); } if(node != null) { if(node.parent() != null) { node.parent().removeChild(node); } node.parent(this); } this._type_ = node; } @Override public String toString() { return "" + toString(this._type_); } @Override void removeChild(@SuppressWarnings("unused") Node child) { // Remove child if(this._type_ == child) { this._type_ = null; return; } throw new RuntimeException("Not a child."); } @Override void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) { // Replace child if(this._type_ == oldChild) { setType((PType) newChild); return; } throw new RuntimeException("Not a child."); } }