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 APrimaryNoNewArrayPrimary extends PPrimary
00040 {
00041 private PPrimaryNoNewArray _primaryNoNewArray_;
00042
00043 public APrimaryNoNewArrayPrimary()
00044 {
00045 }
00046 public APrimaryNoNewArrayPrimary(
00047 PPrimaryNoNewArray _primaryNoNewArray_)
00048 {
00049 setPrimaryNoNewArray(_primaryNoNewArray_);
00050
00051 }
00052 public void apply(Switch sw)
00053 {
00054 ((Analysis) sw).caseAPrimaryNoNewArrayPrimary(this);
00055 }
00056 public Object clone()
00057 {
00058 return new APrimaryNoNewArrayPrimary(
00059 (PPrimaryNoNewArray) cloneNode(_primaryNoNewArray_));
00060 }
00061 public PPrimaryNoNewArray getPrimaryNoNewArray()
00062 {
00063 return _primaryNoNewArray_;
00064 }
00065 void removeChild(Node child)
00066 {
00067 if(_primaryNoNewArray_ == child)
00068 {
00069 _primaryNoNewArray_ = null;
00070 return;
00071 }
00072
00073 }
00074 void replaceChild(Node oldChild, Node newChild)
00075 {
00076 if(_primaryNoNewArray_ == oldChild)
00077 {
00078 setPrimaryNoNewArray((PPrimaryNoNewArray) newChild);
00079 return;
00080 }
00081
00082 }
00083 public void setPrimaryNoNewArray(PPrimaryNoNewArray node)
00084 {
00085 if(_primaryNoNewArray_ != null)
00086 {
00087 _primaryNoNewArray_.parent(null);
00088 }
00089
00090 if(node != null)
00091 {
00092 if(node.parent() != null)
00093 {
00094 node.parent().removeChild(node);
00095 }
00096
00097 node.parent(this);
00098 }
00099
00100 _primaryNoNewArray_ = node;
00101 }
00102 public String toString()
00103 {
00104 return ""
00105 + toString(_primaryNoNewArray_);
00106 }
00107 }