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

ASuperMethodInvocation.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 ASuperMethodInvocation extends PMethodInvocation
00040 {
00041     private TSuper _super_;
00042     private TDot _dot_;
00043     private TId _id_;
00044     private TLPar _lPar_;
00045     private PArgumentList _argumentList_;
00046     private TRPar _rPar_;
00047 
00048     public ASuperMethodInvocation()
00049     {
00050     }
00051     public ASuperMethodInvocation(
00052         TSuper _super_,
00053         TDot _dot_,
00054         TId _id_,
00055         TLPar _lPar_,
00056         PArgumentList _argumentList_,
00057         TRPar _rPar_)
00058     {
00059         setSuper(_super_);
00060 
00061         setDot(_dot_);
00062 
00063         setId(_id_);
00064 
00065         setLPar(_lPar_);
00066 
00067         setArgumentList(_argumentList_);
00068 
00069         setRPar(_rPar_);
00070 
00071     }
00072     public void apply(Switch sw)
00073     {
00074         ((Analysis) sw).caseASuperMethodInvocation(this);
00075     }
00076     public Object clone()
00077     {
00078         return new ASuperMethodInvocation(
00079             (TSuper) cloneNode(_super_),
00080             (TDot) cloneNode(_dot_),
00081             (TId) cloneNode(_id_),
00082             (TLPar) cloneNode(_lPar_),
00083             (PArgumentList) cloneNode(_argumentList_),
00084             (TRPar) cloneNode(_rPar_));
00085     }
00086     public PArgumentList getArgumentList()
00087     {
00088         return _argumentList_;
00089     }
00090     public TDot getDot()
00091     {
00092         return _dot_;
00093     }
00094     public TId getId()
00095     {
00096         return _id_;
00097     }
00098     public TLPar getLPar()
00099     {
00100         return _lPar_;
00101     }
00102     public TRPar getRPar()
00103     {
00104         return _rPar_;
00105     }
00106     public TSuper getSuper()
00107     {
00108         return _super_;
00109     }
00110     void removeChild(Node child)
00111     {
00112         if(_super_ == child)
00113         {
00114             _super_ = null;
00115             return;
00116         }
00117 
00118         if(_dot_ == child)
00119         {
00120             _dot_ = null;
00121             return;
00122         }
00123 
00124         if(_id_ == child)
00125         {
00126             _id_ = null;
00127             return;
00128         }
00129 
00130         if(_lPar_ == child)
00131         {
00132             _lPar_ = null;
00133             return;
00134         }
00135 
00136         if(_argumentList_ == child)
00137         {
00138             _argumentList_ = null;
00139             return;
00140         }
00141 
00142         if(_rPar_ == child)
00143         {
00144             _rPar_ = null;
00145             return;
00146         }
00147 
00148     }
00149     void replaceChild(Node oldChild, Node newChild)
00150     {
00151         if(_super_ == oldChild)
00152         {
00153             setSuper((TSuper) newChild);
00154             return;
00155         }
00156 
00157         if(_dot_ == oldChild)
00158         {
00159             setDot((TDot) newChild);
00160             return;
00161         }
00162 
00163         if(_id_ == oldChild)
00164         {
00165             setId((TId) newChild);
00166             return;
00167         }
00168 
00169         if(_lPar_ == oldChild)
00170         {
00171             setLPar((TLPar) newChild);
00172             return;
00173         }
00174 
00175         if(_argumentList_ == oldChild)
00176         {
00177             setArgumentList((PArgumentList) newChild);
00178             return;
00179         }
00180 
00181         if(_rPar_ == oldChild)
00182         {
00183             setRPar((TRPar) newChild);
00184             return;
00185         }
00186 
00187     }
00188     public void setArgumentList(PArgumentList node)
00189     {
00190         if(_argumentList_ != null)
00191         {
00192             _argumentList_.parent(null);
00193         }
00194 
00195         if(node != null)
00196         {
00197             if(node.parent() != null)
00198             {
00199                 node.parent().removeChild(node);
00200             }
00201 
00202             node.parent(this);
00203         }
00204 
00205         _argumentList_ = node;
00206     }
00207     public void setDot(TDot node)
00208     {
00209         if(_dot_ != null)
00210         {
00211             _dot_.parent(null);
00212         }
00213 
00214         if(node != null)
00215         {
00216             if(node.parent() != null)
00217             {
00218                 node.parent().removeChild(node);
00219             }
00220 
00221             node.parent(this);
00222         }
00223 
00224         _dot_ = node;
00225     }
00226     public void setId(TId node)
00227     {
00228         if(_id_ != null)
00229         {
00230             _id_.parent(null);
00231         }
00232 
00233         if(node != null)
00234         {
00235             if(node.parent() != null)
00236             {
00237                 node.parent().removeChild(node);
00238             }
00239 
00240             node.parent(this);
00241         }
00242 
00243         _id_ = node;
00244     }
00245     public void setLPar(TLPar node)
00246     {
00247         if(_lPar_ != null)
00248         {
00249             _lPar_.parent(null);
00250         }
00251 
00252         if(node != null)
00253         {
00254             if(node.parent() != null)
00255             {
00256                 node.parent().removeChild(node);
00257             }
00258 
00259             node.parent(this);
00260         }
00261 
00262         _lPar_ = node;
00263     }
00264     public void setRPar(TRPar node)
00265     {
00266         if(_rPar_ != null)
00267         {
00268             _rPar_.parent(null);
00269         }
00270 
00271         if(node != null)
00272         {
00273             if(node.parent() != null)
00274             {
00275                 node.parent().removeChild(node);
00276             }
00277 
00278             node.parent(this);
00279         }
00280 
00281         _rPar_ = node;
00282     }
00283     public void setSuper(TSuper node)
00284     {
00285         if(_super_ != null)
00286         {
00287             _super_.parent(null);
00288         }
00289 
00290         if(node != null)
00291         {
00292             if(node.parent() != null)
00293             {
00294                 node.parent().removeChild(node);
00295             }
00296 
00297             node.parent(this);
00298         }
00299 
00300         _super_ = node;
00301     }
00302     public String toString()
00303     {
00304         return ""
00305             + toString(_super_)
00306             + toString(_dot_)
00307             + toString(_id_)
00308             + toString(_lPar_)
00309             + toString(_argumentList_)
00310             + toString(_rPar_);
00311     }
00312 }

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