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 X1PSwitchBlockStmtGroup extends XPSwitchBlockStmtGroup
00040 {
00041 private XPSwitchBlockStmtGroup _xPSwitchBlockStmtGroup_;
00042 private PSwitchBlockStmtGroup _pSwitchBlockStmtGroup_;
00043
00044 public X1PSwitchBlockStmtGroup()
00045 {
00046 }
00047 public X1PSwitchBlockStmtGroup(
00048 XPSwitchBlockStmtGroup _xPSwitchBlockStmtGroup_,
00049 PSwitchBlockStmtGroup _pSwitchBlockStmtGroup_)
00050 {
00051 setXPSwitchBlockStmtGroup(_xPSwitchBlockStmtGroup_);
00052 setPSwitchBlockStmtGroup(_pSwitchBlockStmtGroup_);
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 PSwitchBlockStmtGroup getPSwitchBlockStmtGroup()
00063 {
00064 return _pSwitchBlockStmtGroup_;
00065 }
00066 public XPSwitchBlockStmtGroup getXPSwitchBlockStmtGroup()
00067 {
00068 return _xPSwitchBlockStmtGroup_;
00069 }
00070 void removeChild(Node child)
00071 {
00072 if(_xPSwitchBlockStmtGroup_ == child)
00073 {
00074 _xPSwitchBlockStmtGroup_ = null;
00075 }
00076
00077 if(_pSwitchBlockStmtGroup_ == child)
00078 {
00079 _pSwitchBlockStmtGroup_ = null;
00080 }
00081 }
00082 void replaceChild(Node oldChild, Node newChild)
00083 {
00084 }
00085 public void setPSwitchBlockStmtGroup(PSwitchBlockStmtGroup node)
00086 {
00087 if(_pSwitchBlockStmtGroup_ != null)
00088 {
00089 _pSwitchBlockStmtGroup_.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 _pSwitchBlockStmtGroup_ = node;
00103 }
00104 public void setXPSwitchBlockStmtGroup(XPSwitchBlockStmtGroup node)
00105 {
00106 if(_xPSwitchBlockStmtGroup_ != null)
00107 {
00108 _xPSwitchBlockStmtGroup_.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 _xPSwitchBlockStmtGroup_ = node;
00122 }
00123 public String toString()
00124 {
00125 return "" +
00126 toString(_xPSwitchBlockStmtGroup_) +
00127 toString(_pSwitchBlockStmtGroup_);
00128 }
00129 }