Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

AComplementUnaryNotPlusMinusExp.java

00001 package edu.ksu.cis.bandera.specification.predicate.node;
00002 
00003 /* This file was generated by SableCC (http://www.sable.mcgill.ca/sablecc/). */
00004 
00005 import java.util.*;
00006 import edu.ksu.cis.bandera.specification.predicate.analysis.*;
00007 
00008 public final class AComplementUnaryNotPlusMinusExp extends PUnaryNotPlusMinusExp
00009 {
00010     private TNot _not_;
00011     private PUnaryExp _unaryExp_;
00012 
00013     public AComplementUnaryNotPlusMinusExp()
00014     {
00015     }
00016     public AComplementUnaryNotPlusMinusExp(
00017         TNot _not_,
00018         PUnaryExp _unaryExp_)
00019     {
00020         setNot(_not_);
00021 
00022         setUnaryExp(_unaryExp_);
00023 
00024     }
00025     public void apply(Switch sw)
00026     {
00027         ((Analysis) sw).caseAComplementUnaryNotPlusMinusExp(this);
00028     }
00029     public Object clone()
00030     {
00031         return new AComplementUnaryNotPlusMinusExp(
00032             (TNot) cloneNode(_not_),
00033             (PUnaryExp) cloneNode(_unaryExp_));
00034     }
00035     public TNot getNot()
00036     {
00037         return _not_;
00038     }
00039     public PUnaryExp getUnaryExp()
00040     {
00041         return _unaryExp_;
00042     }
00043     void removeChild(Node child)
00044     {
00045         if(_not_ == child)
00046         {
00047             _not_ = null;
00048             return;
00049         }
00050 
00051         if(_unaryExp_ == child)
00052         {
00053             _unaryExp_ = null;
00054             return;
00055         }
00056 
00057     }
00058     void replaceChild(Node oldChild, Node newChild)
00059     {
00060         if(_not_ == oldChild)
00061         {
00062             setNot((TNot) newChild);
00063             return;
00064         }
00065 
00066         if(_unaryExp_ == oldChild)
00067         {
00068             setUnaryExp((PUnaryExp) newChild);
00069             return;
00070         }
00071 
00072     }
00073     public void setNot(TNot node)
00074     {
00075         if(_not_ != null)
00076         {
00077             _not_.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         _not_ = node;
00091     }
00092     public void setUnaryExp(PUnaryExp node)
00093     {
00094         if(_unaryExp_ != null)
00095         {
00096             _unaryExp_.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         _unaryExp_ = node;
00110     }
00111     public String toString()
00112     {
00113         return ""
00114             + toString(_not_)
00115             + toString(_unaryExp_);
00116     }
00117 }

Generated at Thu Feb 7 06:37:01 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001