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

ANavigationExp.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 ANavigationExp extends PExp
00009 {
00010     private PExp _exp_;
00011     private PNavigation _navigation_;
00012 
00013     public ANavigationExp()
00014     {
00015     }
00016     public ANavigationExp(
00017         PExp _exp_,
00018         PNavigation _navigation_)
00019     {
00020         setExp(_exp_);
00021 
00022         setNavigation(_navigation_);
00023 
00024     }
00025     public void apply(Switch sw)
00026     {
00027         ((Analysis) sw).caseANavigationExp(this);
00028     }
00029     public Object clone()
00030     {
00031         return new ANavigationExp(
00032             (PExp) cloneNode(_exp_),
00033             (PNavigation) cloneNode(_navigation_));
00034     }
00035     public PExp getExp()
00036     {
00037         return _exp_;
00038     }
00039     public PNavigation getNavigation()
00040     {
00041         return _navigation_;
00042     }
00043     void removeChild(Node child)
00044     {
00045         if(_exp_ == child)
00046         {
00047             _exp_ = null;
00048             return;
00049         }
00050 
00051         if(_navigation_ == child)
00052         {
00053             _navigation_ = null;
00054             return;
00055         }
00056 
00057     }
00058     void replaceChild(Node oldChild, Node newChild)
00059     {
00060         if(_exp_ == oldChild)
00061         {
00062             setExp((PExp) newChild);
00063             return;
00064         }
00065 
00066         if(_navigation_ == oldChild)
00067         {
00068             setNavigation((PNavigation) 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 setNavigation(PNavigation node)
00093     {
00094         if(_navigation_ != null)
00095         {
00096             _navigation_.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         _navigation_ = node;
00110     }
00111     public String toString()
00112     {
00113         return ""
00114             + toString(_exp_)
00115             + toString(_navigation_);
00116     }
00117 }

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