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

AColonExp.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 AColonExp extends PColonExp
00009 {
00010     private TColon _colon_;
00011     private PExp _exp_;
00012 
00013     public AColonExp()
00014     {
00015     }
00016     public AColonExp(
00017         TColon _colon_,
00018         PExp _exp_)
00019     {
00020         setColon(_colon_);
00021 
00022         setExp(_exp_);
00023 
00024     }
00025     public void apply(Switch sw)
00026     {
00027         ((Analysis) sw).caseAColonExp(this);
00028     }
00029     public Object clone()
00030     {
00031         return new AColonExp(
00032             (TColon) cloneNode(_colon_),
00033             (PExp) cloneNode(_exp_));
00034     }
00035     public TColon getColon()
00036     {
00037         return _colon_;
00038     }
00039     public PExp getExp()
00040     {
00041         return _exp_;
00042     }
00043     void removeChild(Node child)
00044     {
00045         if(_colon_ == child)
00046         {
00047             _colon_ = 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(_colon_ == oldChild)
00061         {
00062             setColon((TColon) newChild);
00063             return;
00064         }
00065 
00066         if(_exp_ == oldChild)
00067         {
00068             setExp((PExp) newChild);
00069             return;
00070         }
00071 
00072     }
00073     public void setColon(TColon node)
00074     {
00075         if(_colon_ != null)
00076         {
00077             _colon_.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         _colon_ = node;
00091     }
00092     public void setExp(PExp node)
00093     {
00094         if(_exp_ != null)
00095         {
00096             _exp_.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         _exp_ = node;
00110     }
00111     public String toString()
00112     {
00113         return ""
00114             + toString(_colon_)
00115             + toString(_exp_);
00116     }
00117 }

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