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 X2PPropositionDefinition extends XPPropositionDefinition
00008 {
00009 private PPropositionDefinition _pPropositionDefinition_;
00010
00011 public X2PPropositionDefinition()
00012 {
00013 }
00014 public X2PPropositionDefinition(
00015 PPropositionDefinition _pPropositionDefinition_)
00016 {
00017 setPPropositionDefinition(_pPropositionDefinition_);
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 PPropositionDefinition getPPropositionDefinition()
00028 {
00029 return _pPropositionDefinition_;
00030 }
00031 void removeChild(Node child)
00032 {
00033 if(_pPropositionDefinition_ == child)
00034 {
00035 _pPropositionDefinition_ = null;
00036 }
00037 }
00038 void replaceChild(Node oldChild, Node newChild)
00039 {
00040 }
00041 public void setPPropositionDefinition(PPropositionDefinition node)
00042 {
00043 if(_pPropositionDefinition_ != null)
00044 {
00045 _pPropositionDefinition_.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 _pPropositionDefinition_ = node;
00059 }
00060 public String toString()
00061 {
00062 return "" +
00063 toString(_pPropositionDefinition_);
00064 }
00065 }