00001 package edu.ksu.cis.bandera.abstraction.options.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
00037
00038 import edu.ksu.cis.bandera.abstraction.options.analysis.*;
00039
00040 public final class X1PMethodOption extends XPMethodOption
00041 {
00042 private XPMethodOption _xPMethodOption_;
00043 private PMethodOption _pMethodOption_;
00044
00045 public X1PMethodOption()
00046 {
00047 }
00048 public X1PMethodOption(
00049 XPMethodOption _xPMethodOption_,
00050 PMethodOption _pMethodOption_)
00051 {
00052 setXPMethodOption(_xPMethodOption_);
00053 setPMethodOption(_pMethodOption_);
00054 }
00055 public void apply(Switch sw)
00056 {
00057 throw new RuntimeException("Switch not supported.");
00058 }
00059 public Object clone()
00060 {
00061 throw new RuntimeException("Unsupported Operation");
00062 }
00063 public PMethodOption getPMethodOption()
00064 {
00065 return _pMethodOption_;
00066 }
00067 public XPMethodOption getXPMethodOption()
00068 {
00069 return _xPMethodOption_;
00070 }
00071 void removeChild(Node child)
00072 {
00073 if(_xPMethodOption_ == child)
00074 {
00075 _xPMethodOption_ = null;
00076 }
00077
00078 if(_pMethodOption_ == child)
00079 {
00080 _pMethodOption_ = null;
00081 }
00082 }
00083 void replaceChild(Node oldChild, Node newChild)
00084 {
00085 }
00086 public void setPMethodOption(PMethodOption node)
00087 {
00088 if(_pMethodOption_ != null)
00089 {
00090 _pMethodOption_.parent(null);
00091 }
00092
00093 if(node != null)
00094 {
00095 if(node.parent() != null)
00096 {
00097 node.parent().removeChild(node);
00098 }
00099
00100 node.parent(this);
00101 }
00102
00103 _pMethodOption_ = node;
00104 }
00105 public void setXPMethodOption(XPMethodOption node)
00106 {
00107 if(_xPMethodOption_ != null)
00108 {
00109 _xPMethodOption_.parent(null);
00110 }
00111
00112 if(node != null)
00113 {
00114 if(node.parent() != null)
00115 {
00116 node.parent().removeChild(node);
00117 }
00118
00119 node.parent(this);
00120 }
00121
00122 _xPMethodOption_ = node;
00123 }
00124 public String toString()
00125 {
00126 return "" +
00127 toString(_xPMethodOption_) +
00128 toString(_pMethodOption_);
00129 }
00130 }