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

AComplementExp.java

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

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