00001 package edu.ksu.cis.bandera.specification.predicate.node;
00002
00003
00004
00005 import edu.ksu.cis.bandera.specification.predicate.analysis.*;
00006
00007 public final class X2PComment extends XPComment
00008 {
00009 private PComment _pComment_;
00010
00011 public X2PComment()
00012 {
00013 }
00014 public X2PComment(
00015 PComment _pComment_)
00016 {
00017 setPComment(_pComment_);
00018 }
00019 public void apply(Switch sw)
00020 {
00021 throw new RuntimeException("Switch not supported.");
00022 }
00023 public Object clone()
00024 {
00025 throw new RuntimeException("Unsupported Operation");
00026 }
00027 public PComment getPComment()
00028 {
00029 return _pComment_;
00030 }
00031 void removeChild(Node child)
00032 {
00033 if(_pComment_ == child)
00034 {
00035 _pComment_ = null;
00036 }
00037 }
00038 void replaceChild(Node oldChild, Node newChild)
00039 {
00040 }
00041 public void setPComment(PComment node)
00042 {
00043 if(_pComment_ != null)
00044 {
00045 _pComment_.parent(null);
00046 }
00047
00048 if(node != null)
00049 {
00050 if(node.parent() != null)
00051 {
00052 node.parent().removeChild(node);
00053 }
00054
00055 node.parent(this);
00056 }
00057
00058 _pComment_ = node;
00059 }
00060 public String toString()
00061 {
00062 return "" +
00063 toString(_pComment_);
00064 }
00065 }