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

Start.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 edu.ksu.cis.bandera.specification.predicate.analysis.*;
00006 
00007 public final class Start extends Node
00008 {
00009     private PUnit _pUnit_;
00010     private EOF _eof_;
00011 
00012     public Start()
00013     {
00014     }
00015     public Start(
00016         PUnit _pUnit_,
00017         EOF _eof_)
00018     {
00019         setPUnit(_pUnit_);
00020         setEOF(_eof_);
00021     }
00022     public void apply(Switch sw)
00023     {
00024         ((Analysis) sw).caseStart(this);
00025     }
00026     public Object clone()
00027     {
00028         return new Start(
00029             (PUnit) cloneNode(_pUnit_),
00030             (EOF) cloneNode(_eof_));
00031     }
00032     public EOF getEOF()
00033     {
00034         return _eof_;
00035     }
00036     public PUnit getPUnit()
00037     {
00038         return _pUnit_;
00039     }
00040     void removeChild(Node child)
00041     {
00042         if(_pUnit_ == child)
00043         {
00044             _pUnit_ = null;
00045             return;
00046         }
00047 
00048         if(_eof_ == child)
00049         {
00050             _eof_ = null;
00051             return;
00052         }
00053     }
00054     void replaceChild(Node oldChild, Node newChild)
00055     {
00056         if(_pUnit_ == oldChild)
00057         {
00058             setPUnit((PUnit) newChild);
00059             return;
00060         }
00061 
00062         if(_eof_ == oldChild)
00063         {
00064             setEOF((EOF) newChild);
00065             return;
00066         }
00067     }
00068     public void setEOF(EOF node)
00069     {
00070         if(_eof_ != null)
00071         {
00072             _eof_.parent(null);
00073         }
00074 
00075         if(node != null)
00076         {
00077             if(node.parent() != null)
00078             {
00079                 node.parent().removeChild(node);
00080             }
00081 
00082             node.parent(this);
00083         }
00084 
00085         _eof_ = node;
00086     }
00087     public void setPUnit(PUnit node)
00088     {
00089         if(_pUnit_ != null)
00090         {
00091             _pUnit_.parent(null);
00092         }
00093 
00094         if(node != null)
00095         {
00096             if(node.parent() != null)
00097             {
00098                 node.parent().removeChild(node);
00099             }
00100 
00101             node.parent(this);
00102         }
00103 
00104         _pUnit_ = node;
00105     }
00106     public String toString()
00107     {
00108         return "" +
00109             toString(_pUnit_) +
00110             toString(_eof_);
00111     }
00112 }

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