00001 package edu.ksu.cis.bandera.jjjc.node;
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 import ca.mcgill.sable.util.*;
00037 import edu.ksu.cis.bandera.jjjc.analysis.*;
00038
00039 public final class X1PInterfaceMemberDeclaration extends XPInterfaceMemberDeclaration
00040 {
00041 private XPInterfaceMemberDeclaration _xPInterfaceMemberDeclaration_;
00042 private PInterfaceMemberDeclaration _pInterfaceMemberDeclaration_;
00043
00044 public X1PInterfaceMemberDeclaration()
00045 {
00046 }
00047 public X1PInterfaceMemberDeclaration(
00048 XPInterfaceMemberDeclaration _xPInterfaceMemberDeclaration_,
00049 PInterfaceMemberDeclaration _pInterfaceMemberDeclaration_)
00050 {
00051 setXPInterfaceMemberDeclaration(_xPInterfaceMemberDeclaration_);
00052 setPInterfaceMemberDeclaration(_pInterfaceMemberDeclaration_);
00053 }
00054 public void apply(Switch sw)
00055 {
00056 throw new RuntimeException("Switch not supported.");
00057 }
00058 public Object clone()
00059 {
00060 throw new RuntimeException("Unsupported Operation");
00061 }
00062 public PInterfaceMemberDeclaration getPInterfaceMemberDeclaration()
00063 {
00064 return _pInterfaceMemberDeclaration_;
00065 }
00066 public XPInterfaceMemberDeclaration getXPInterfaceMemberDeclaration()
00067 {
00068 return _xPInterfaceMemberDeclaration_;
00069 }
00070 void removeChild(Node child)
00071 {
00072 if(_xPInterfaceMemberDeclaration_ == child)
00073 {
00074 _xPInterfaceMemberDeclaration_ = null;
00075 }
00076
00077 if(_pInterfaceMemberDeclaration_ == child)
00078 {
00079 _pInterfaceMemberDeclaration_ = null;
00080 }
00081 }
00082 void replaceChild(Node oldChild, Node newChild)
00083 {
00084 }
00085 public void setPInterfaceMemberDeclaration(PInterfaceMemberDeclaration node)
00086 {
00087 if(_pInterfaceMemberDeclaration_ != null)
00088 {
00089 _pInterfaceMemberDeclaration_.parent(null);
00090 }
00091
00092 if(node != null)
00093 {
00094 if(node.parent() != null)
00095 {
00096 node.parent().removeChild(node);
00097 }
00098
00099 node.parent(this);
00100 }
00101
00102 _pInterfaceMemberDeclaration_ = node;
00103 }
00104 public void setXPInterfaceMemberDeclaration(XPInterfaceMemberDeclaration node)
00105 {
00106 if(_xPInterfaceMemberDeclaration_ != null)
00107 {
00108 _xPInterfaceMemberDeclaration_.parent(null);
00109 }
00110
00111 if(node != null)
00112 {
00113 if(node.parent() != null)
00114 {
00115 node.parent().removeChild(node);
00116 }
00117
00118 node.parent(this);
00119 }
00120
00121 _xPInterfaceMemberDeclaration_ = node;
00122 }
00123 public String toString()
00124 {
00125 return "" +
00126 toString(_xPInterfaceMemberDeclaration_) +
00127 toString(_pInterfaceMemberDeclaration_);
00128 }
00129 }