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

AOrInclusiveOrExp.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 AOrInclusiveOrExp extends PInclusiveOrExp
00009 {
00010     private PInclusiveOrExp _inclusiveOrExp_;
00011     private TBitOr _bitOr_;
00012     private PExclusiveOrExp _exclusiveOrExp_;
00013 
00014     public AOrInclusiveOrExp()
00015     {
00016     }
00017     public AOrInclusiveOrExp(
00018         PInclusiveOrExp _inclusiveOrExp_,
00019         TBitOr _bitOr_,
00020         PExclusiveOrExp _exclusiveOrExp_)
00021     {
00022         setInclusiveOrExp(_inclusiveOrExp_);
00023 
00024         setBitOr(_bitOr_);
00025 
00026         setExclusiveOrExp(_exclusiveOrExp_);
00027 
00028     }
00029     public void apply(Switch sw)
00030     {
00031         ((Analysis) sw).caseAOrInclusiveOrExp(this);
00032     }
00033     public Object clone()
00034     {
00035         return new AOrInclusiveOrExp(
00036             (PInclusiveOrExp) cloneNode(_inclusiveOrExp_),
00037             (TBitOr) cloneNode(_bitOr_),
00038             (PExclusiveOrExp) cloneNode(_exclusiveOrExp_));
00039     }
00040     public TBitOr getBitOr()
00041     {
00042         return _bitOr_;
00043     }
00044     public PExclusiveOrExp getExclusiveOrExp()
00045     {
00046         return _exclusiveOrExp_;
00047     }
00048     public PInclusiveOrExp getInclusiveOrExp()
00049     {
00050         return _inclusiveOrExp_;
00051     }
00052     void removeChild(Node child)
00053     {
00054         if(_inclusiveOrExp_ == child)
00055         {
00056             _inclusiveOrExp_ = null;
00057             return;
00058         }
00059 
00060         if(_bitOr_ == child)
00061         {
00062             _bitOr_ = null;
00063             return;
00064         }
00065 
00066         if(_exclusiveOrExp_ == child)
00067         {
00068             _exclusiveOrExp_ = null;
00069             return;
00070         }
00071 
00072     }
00073     void replaceChild(Node oldChild, Node newChild)
00074     {
00075         if(_inclusiveOrExp_ == oldChild)
00076         {
00077             setInclusiveOrExp((PInclusiveOrExp) newChild);
00078             return;
00079         }
00080 
00081         if(_bitOr_ == oldChild)
00082         {
00083             setBitOr((TBitOr) newChild);
00084             return;
00085         }
00086 
00087         if(_exclusiveOrExp_ == oldChild)
00088         {
00089             setExclusiveOrExp((PExclusiveOrExp) newChild);
00090             return;
00091         }
00092 
00093     }
00094     public void setBitOr(TBitOr node)
00095     {
00096         if(_bitOr_ != null)
00097         {
00098             _bitOr_.parent(null);
00099         }
00100 
00101         if(node != null)
00102         {
00103             if(node.parent() != null)
00104             {
00105                 node.parent().removeChild(node);
00106             }
00107 
00108             node.parent(this);
00109         }
00110 
00111         _bitOr_ = node;
00112     }
00113     public void setExclusiveOrExp(PExclusiveOrExp node)
00114     {
00115         if(_exclusiveOrExp_ != null)
00116         {
00117             _exclusiveOrExp_.parent(null);
00118         }
00119 
00120         if(node != null)
00121         {
00122             if(node.parent() != null)
00123             {
00124                 node.parent().removeChild(node);
00125             }
00126 
00127             node.parent(this);
00128         }
00129 
00130         _exclusiveOrExp_ = node;
00131     }
00132     public void setInclusiveOrExp(PInclusiveOrExp node)
00133     {
00134         if(_inclusiveOrExp_ != null)
00135         {
00136             _inclusiveOrExp_.parent(null);
00137         }
00138 
00139         if(node != null)
00140         {
00141             if(node.parent() != null)
00142             {
00143                 node.parent().removeChild(node);
00144             }
00145 
00146             node.parent(this);
00147         }
00148 
00149         _inclusiveOrExp_ = node;
00150     }
00151     public String toString()
00152     {
00153         return ""
00154             + toString(_inclusiveOrExp_)
00155             + toString(_bitOr_)
00156             + toString(_exclusiveOrExp_);
00157     }
00158 }

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