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 X2PClassBodyDeclaration extends XPClassBodyDeclaration
00040 {
00041 private PClassBodyDeclaration _pClassBodyDeclaration_;
00042
00043 public X2PClassBodyDeclaration()
00044 {
00045 }
00046 public X2PClassBodyDeclaration(
00047 PClassBodyDeclaration _pClassBodyDeclaration_)
00048 {
00049 setPClassBodyDeclaration(_pClassBodyDeclaration_);
00050 }
00051 public void apply(Switch sw)
00052 {
00053 throw new RuntimeException("Switch not supported.");
00054 }
00055 public Object clone()
00056 {
00057 throw new RuntimeException("Unsupported Operation");
00058 }
00059 public PClassBodyDeclaration getPClassBodyDeclaration()
00060 {
00061 return _pClassBodyDeclaration_;
00062 }
00063 void removeChild(Node child)
00064 {
00065 if(_pClassBodyDeclaration_ == child)
00066 {
00067 _pClassBodyDeclaration_ = null;
00068 }
00069 }
00070 void replaceChild(Node oldChild, Node newChild)
00071 {
00072 }
00073 public void setPClassBodyDeclaration(PClassBodyDeclaration node)
00074 {
00075 if(_pClassBodyDeclaration_ != null)
00076 {
00077 _pClassBodyDeclaration_.parent(null);
00078 }
00079
00080 if(node != null)
00081 {
00082 if(node.parent() != null)
00083 {
00084 node.parent().removeChild(node);
00085 }
00086
00087 node.parent(this);
00088 }
00089
00090 _pClassBodyDeclaration_ = node;
00091 }
00092 public String toString()
00093 {
00094 return "" +
00095 toString(_pClassBodyDeclaration_);
00096 }
00097 }