00001 package edu.ksu.cis.bandera.specification.predicate.node;
00002
00003
00004
00005 import java.util.*;
00006 import edu.ksu.cis.bandera.specification.predicate.analysis.*;
00007
00008 public final class ACpl extends PCpl
00009 {
00010 private TComma _comma_;
00011 private PParamList _paramList_;
00012
00013 public ACpl()
00014 {
00015 }
00016 public ACpl(
00017 TComma _comma_,
00018 PParamList _paramList_)
00019 {
00020 setComma(_comma_);
00021
00022 setParamList(_paramList_);
00023
00024 }
00025 public void apply(Switch sw)
00026 {
00027 ((Analysis) sw).caseACpl(this);
00028 }
00029 public Object clone()
00030 {
00031 return new ACpl(
00032 (TComma) cloneNode(_comma_),
00033 (PParamList) cloneNode(_paramList_));
00034 }
00035 public TComma getComma()
00036 {
00037 return _comma_;
00038 }
00039 public PParamList getParamList()
00040 {
00041 return _paramList_;
00042 }
00043 void removeChild(Node child)
00044 {
00045 if(_comma_ == child)
00046 {
00047 _comma_ = null;
00048 return;
00049 }
00050
00051 if(_paramList_ == child)
00052 {
00053 _paramList_ = null;
00054 return;
00055 }
00056
00057 }
00058 void replaceChild(Node oldChild, Node newChild)
00059 {
00060 if(_comma_ == oldChild)
00061 {
00062 setComma((TComma) newChild);
00063 return;
00064 }
00065
00066 if(_paramList_ == oldChild)
00067 {
00068 setParamList((PParamList) newChild);
00069 return;
00070 }
00071
00072 }
00073 public void setComma(TComma node)
00074 {
00075 if(_comma_ != null)
00076 {
00077 _comma_.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 _comma_ = node;
00091 }
00092 public void setParamList(PParamList node)
00093 {
00094 if(_paramList_ != null)
00095 {
00096 _paramList_.parent(null);
00097 }
00098
00099 if(node != null)
00100 {
00101 if(node.parent() != null)
00102 {
00103 node.parent().removeChild(node);
00104 }
00105
00106 node.parent(this);
00107 }
00108
00109 _paramList_ = node;
00110 }
00111 public String toString()
00112 {
00113 return ""
00114 + toString(_comma_)
00115 + toString(_paramList_);
00116 }
00117 }