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

AOldQualifiedClassInstanceCreationExp.java

00001 package edu.ksu.cis.bandera.jjjc.node;
00002 
00003 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00004  * Bandera, a Java(TM) analysis and transformation toolkit           *
00005  * Copyright (C) 1998-2001 SAnToS Laboratories (santos@cis.ksu.edu)  *
00006 
00007  * All rights reserved.                                              *
00008  *                                                                   *
00009  * This work was done as a project in the SAnToS Laboratory,         *
00010  * Department of Computing and Information Sciences, Kansas State    *
00011  * University, USA (http://www.cis.ksu.edu/santos).                  *
00012  * It is understood that any modification not identified as such is  *
00013  * not covered by the preceding statement.                           *
00014  *                                                                   *
00015  * This work is free software; you can redistribute it and/or        *
00016  * modify it under the terms of the GNU Library General Public       *
00017  * License as published by the Free Software Foundation; either      *
00018  * version 2 of the License, or (at your option) any later version.  *
00019  *                                                                   *
00020  * This work is distributed in the hope that it will be useful,      *
00021  * but WITHOUT ANY WARRANTY; without even the implied warranty of    *
00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU *
00023  * Library General Public License for more details.                  *
00024  *                                                                   *
00025  * You should have received a copy of the GNU Library General Public *
00026  * License along with this toolkit; if not, write to the             *
00027  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,      *
00028  * Boston, MA  02111-1307, USA.                                      *
00029  *                                                                   *
00030  * Java is a trademark of Sun Microsystems, Inc.                     *
00031  *                                                                   *
00032  * To submit a bug report, send a comment, or get the latest news on *
00033  * this project and other SAnToS projects, please visit the web-site *
00034  *                http://www.cis.ksu.edu/santos                      *
00035  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
00036 import ca.mcgill.sable.util.*;
00037 import edu.ksu.cis.bandera.jjjc.analysis.*;
00038 
00039 public final class AOldQualifiedClassInstanceCreationExp extends PClassInstanceCreationExp
00040 {
00041     private PPrimary _primary_;
00042     private TDot _dot_;
00043     private TNew _new_;
00044     private TId _id_;
00045     private TLPar _lPar_;
00046     private PArgumentList _argumentList_;
00047     private TRPar _rPar_;
00048     private PClassBody _classBody_;
00049 
00050     public AOldQualifiedClassInstanceCreationExp()
00051     {
00052     }
00053     public AOldQualifiedClassInstanceCreationExp(
00054         PPrimary _primary_,
00055         TDot _dot_,
00056         TNew _new_,
00057         TId _id_,
00058         TLPar _lPar_,
00059         PArgumentList _argumentList_,
00060         TRPar _rPar_,
00061         PClassBody _classBody_)
00062     {
00063         setPrimary(_primary_);
00064 
00065         setDot(_dot_);
00066 
00067         setNew(_new_);
00068 
00069         setId(_id_);
00070 
00071         setLPar(_lPar_);
00072 
00073         setArgumentList(_argumentList_);
00074 
00075         setRPar(_rPar_);
00076 
00077         setClassBody(_classBody_);
00078 
00079     }
00080     public void apply(Switch sw)
00081     {
00082         ((Analysis) sw).caseAOldQualifiedClassInstanceCreationExp(this);
00083     }
00084     public Object clone()
00085     {
00086         return new AOldQualifiedClassInstanceCreationExp(
00087             (PPrimary) cloneNode(_primary_),
00088             (TDot) cloneNode(_dot_),
00089             (TNew) cloneNode(_new_),
00090             (TId) cloneNode(_id_),
00091             (TLPar) cloneNode(_lPar_),
00092             (PArgumentList) cloneNode(_argumentList_),
00093             (TRPar) cloneNode(_rPar_),
00094             (PClassBody) cloneNode(_classBody_));
00095     }
00096     public PArgumentList getArgumentList()
00097     {
00098         return _argumentList_;
00099     }
00100     public PClassBody getClassBody()
00101     {
00102         return _classBody_;
00103     }
00104     public TDot getDot()
00105     {
00106         return _dot_;
00107     }
00108     public TId getId()
00109     {
00110         return _id_;
00111     }
00112     public TLPar getLPar()
00113     {
00114         return _lPar_;
00115     }
00116     public TNew getNew()
00117     {
00118         return _new_;
00119     }
00120     public PPrimary getPrimary()
00121     {
00122         return _primary_;
00123     }
00124     public TRPar getRPar()
00125     {
00126         return _rPar_;
00127     }
00128     void removeChild(Node child)
00129     {
00130         if(_primary_ == child)
00131         {
00132             _primary_ = null;
00133             return;
00134         }
00135 
00136         if(_dot_ == child)
00137         {
00138             _dot_ = null;
00139             return;
00140         }
00141 
00142         if(_new_ == child)
00143         {
00144             _new_ = null;
00145             return;
00146         }
00147 
00148         if(_id_ == child)
00149         {
00150             _id_ = null;
00151             return;
00152         }
00153 
00154         if(_lPar_ == child)
00155         {
00156             _lPar_ = null;
00157             return;
00158         }
00159 
00160         if(_argumentList_ == child)
00161         {
00162             _argumentList_ = null;
00163             return;
00164         }
00165 
00166         if(_rPar_ == child)
00167         {
00168             _rPar_ = null;
00169             return;
00170         }
00171 
00172         if(_classBody_ == child)
00173         {
00174             _classBody_ = null;
00175             return;
00176         }
00177 
00178     }
00179     void replaceChild(Node oldChild, Node newChild)
00180     {
00181         if(_primary_ == oldChild)
00182         {
00183             setPrimary((PPrimary) newChild);
00184             return;
00185         }
00186 
00187         if(_dot_ == oldChild)
00188         {
00189             setDot((TDot) newChild);
00190             return;
00191         }
00192 
00193         if(_new_ == oldChild)
00194         {
00195             setNew((TNew) newChild);
00196             return;
00197         }
00198 
00199         if(_id_ == oldChild)
00200         {
00201             setId((TId) newChild);
00202             return;
00203         }
00204 
00205         if(_lPar_ == oldChild)
00206         {
00207             setLPar((TLPar) newChild);
00208             return;
00209         }
00210 
00211         if(_argumentList_ == oldChild)
00212         {
00213             setArgumentList((PArgumentList) newChild);
00214             return;
00215         }
00216 
00217         if(_rPar_ == oldChild)
00218         {
00219             setRPar((TRPar) newChild);
00220             return;
00221         }
00222 
00223         if(_classBody_ == oldChild)
00224         {
00225             setClassBody((PClassBody) newChild);
00226             return;
00227         }
00228 
00229     }
00230     public void setArgumentList(PArgumentList node)
00231     {
00232         if(_argumentList_ != null)
00233         {
00234             _argumentList_.parent(null);
00235         }
00236 
00237         if(node != null)
00238         {
00239             if(node.parent() != null)
00240             {
00241                 node.parent().removeChild(node);
00242             }
00243 
00244             node.parent(this);
00245         }
00246 
00247         _argumentList_ = node;
00248     }
00249     public void setClassBody(PClassBody node)
00250     {
00251         if(_classBody_ != null)
00252         {
00253             _classBody_.parent(null);
00254         }
00255 
00256         if(node != null)
00257         {
00258             if(node.parent() != null)
00259             {
00260                 node.parent().removeChild(node);
00261             }
00262 
00263             node.parent(this);
00264         }
00265 
00266         _classBody_ = node;
00267     }
00268     public void setDot(TDot node)
00269     {
00270         if(_dot_ != null)
00271         {
00272             _dot_.parent(null);
00273         }
00274 
00275         if(node != null)
00276         {
00277             if(node.parent() != null)
00278             {
00279                 node.parent().removeChild(node);
00280             }
00281 
00282             node.parent(this);
00283         }
00284 
00285         _dot_ = node;
00286     }
00287     public void setId(TId node)
00288     {
00289         if(_id_ != null)
00290         {
00291             _id_.parent(null);
00292         }
00293 
00294         if(node != null)
00295         {
00296             if(node.parent() != null)
00297             {
00298                 node.parent().removeChild(node);
00299             }
00300 
00301             node.parent(this);
00302         }
00303 
00304         _id_ = node;
00305     }
00306     public void setLPar(TLPar node)
00307     {
00308         if(_lPar_ != null)
00309         {
00310             _lPar_.parent(null);
00311         }
00312 
00313         if(node != null)
00314         {
00315             if(node.parent() != null)
00316             {
00317                 node.parent().removeChild(node);
00318             }
00319 
00320             node.parent(this);
00321         }
00322 
00323         _lPar_ = node;
00324     }
00325     public void setNew(TNew node)
00326     {
00327         if(_new_ != null)
00328         {
00329             _new_.parent(null);
00330         }
00331 
00332         if(node != null)
00333         {
00334             if(node.parent() != null)
00335             {
00336                 node.parent().removeChild(node);
00337             }
00338 
00339             node.parent(this);
00340         }
00341 
00342         _new_ = node;
00343     }
00344     public void setPrimary(PPrimary node)
00345     {
00346         if(_primary_ != null)
00347         {
00348             _primary_.parent(null);
00349         }
00350 
00351         if(node != null)
00352         {
00353             if(node.parent() != null)
00354             {
00355                 node.parent().removeChild(node);
00356             }
00357 
00358             node.parent(this);
00359         }
00360 
00361         _primary_ = node;
00362     }
00363     public void setRPar(TRPar node)
00364     {
00365         if(_rPar_ != null)
00366         {
00367             _rPar_.parent(null);
00368         }
00369 
00370         if(node != null)
00371         {
00372             if(node.parent() != null)
00373             {
00374                 node.parent().removeChild(node);
00375             }
00376 
00377             node.parent(this);
00378         }
00379 
00380         _rPar_ = node;
00381     }
00382     public String toString()
00383     {
00384         return ""
00385             + toString(_primary_)
00386             + toString(_dot_)
00387             + toString(_new_)
00388             + toString(_id_)
00389             + toString(_lPar_)
00390             + toString(_argumentList_)
00391             + toString(_rPar_)
00392             + toString(_classBody_);
00393     }
00394 }

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