KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > soot > jimple > parser > node > AStaticInvokeExpr


1 /* This file was generated by SableCC (http://www.sablecc.org/). */
2
3 package soot.jimple.parser.node;
4
5 import java.util.*;
6 import soot.jimple.parser.analysis.*;
7
8 public final class AStaticInvokeExpr extends PInvokeExpr
9 {
10     private TStaticinvoke _staticinvoke_;
11     private PMethodSignature _methodSignature_;
12     private TLParen _lParen_;
13     private PArgList _argList_;
14     private TRParen _rParen_;
15
16     public AStaticInvokeExpr()
17     {
18     }
19
20     public AStaticInvokeExpr(
21         TStaticinvoke _staticinvoke_,
22         PMethodSignature _methodSignature_,
23         TLParen _lParen_,
24         PArgList _argList_,
25         TRParen _rParen_)
26     {
27         setStaticinvoke(_staticinvoke_);
28
29         setMethodSignature(_methodSignature_);
30
31         setLParen(_lParen_);
32
33         setArgList(_argList_);
34
35         setRParen(_rParen_);
36
37     }
38     public Object JavaDoc clone()
39     {
40         return new AStaticInvokeExpr(
41             (TStaticinvoke) cloneNode(_staticinvoke_),
42             (PMethodSignature) cloneNode(_methodSignature_),
43             (TLParen) cloneNode(_lParen_),
44             (PArgList) cloneNode(_argList_),
45             (TRParen) cloneNode(_rParen_));
46     }
47
48     public void apply(Switch sw)
49     {
50         ((Analysis) sw).caseAStaticInvokeExpr(this);
51     }
52
53     public TStaticinvoke getStaticinvoke()
54     {
55         return _staticinvoke_;
56     }
57
58     public void setStaticinvoke(TStaticinvoke node)
59     {
60         if(_staticinvoke_ != null)
61         {
62             _staticinvoke_.parent(null);
63         }
64
65         if(node != null)
66         {
67             if(node.parent() != null)
68             {
69                 node.parent().removeChild(node);
70             }
71
72             node.parent(this);
73         }
74
75         _staticinvoke_ = node;
76     }
77
78     public PMethodSignature getMethodSignature()
79     {
80         return _methodSignature_;
81     }
82
83     public void setMethodSignature(PMethodSignature node)
84     {
85         if(_methodSignature_ != null)
86         {
87             _methodSignature_.parent(null);
88         }
89
90         if(node != null)
91         {
92             if(node.parent() != null)
93             {
94                 node.parent().removeChild(node);
95             }
96
97             node.parent(this);
98         }
99
100         _methodSignature_ = node;
101     }
102
103     public TLParen getLParen()
104     {
105         return _lParen_;
106     }
107
108     public void setLParen(TLParen node)
109     {
110         if(_lParen_ != null)
111         {
112             _lParen_.parent(null);
113         }
114
115         if(node != null)
116         {
117             if(node.parent() != null)
118             {
119                 node.parent().removeChild(node);
120             }
121
122             node.parent(this);
123         }
124
125         _lParen_ = node;
126     }
127
128     public PArgList getArgList()
129     {
130         return _argList_;
131     }
132
133     public void setArgList(PArgList node)
134     {
135         if(_argList_ != null)
136         {
137             _argList_.parent(null);
138         }
139
140         if(node != null)
141         {
142             if(node.parent() != null)
143             {
144                 node.parent().removeChild(node);
145             }
146
147             node.parent(this);
148         }
149
150         _argList_ = node;
151     }
152
153     public TRParen getRParen()
154     {
155         return _rParen_;
156     }
157
158     public void setRParen(TRParen node)
159     {
160         if(_rParen_ != null)
161         {
162             _rParen_.parent(null);
163         }
164
165         if(node != null)
166         {
167             if(node.parent() != null)
168             {
169                 node.parent().removeChild(node);
170             }
171
172             node.parent(this);
173         }
174
175         _rParen_ = node;
176     }
177
178     public String JavaDoc toString()
179     {
180         return ""
181             + toString(_staticinvoke_)
182             + toString(_methodSignature_)
183             + toString(_lParen_)
184             + toString(_argList_)
185             + toString(_rParen_);
186     }
187
188     void removeChild(Node child)
189     {
190         if(_staticinvoke_ == child)
191         {
192             _staticinvoke_ = null;
193             return;
194         }
195
196         if(_methodSignature_ == child)
197         {
198             _methodSignature_ = null;
199             return;
200         }
201
202         if(_lParen_ == child)
203         {
204             _lParen_ = null;
205             return;
206         }
207
208         if(_argList_ == child)
209         {
210             _argList_ = null;
211             return;
212         }
213
214         if(_rParen_ == child)
215         {
216             _rParen_ = null;
217             return;
218         }
219
220     }
221
222     void replaceChild(Node oldChild, Node newChild)
223     {
224         if(_staticinvoke_ == oldChild)
225         {
226             setStaticinvoke((TStaticinvoke) newChild);
227             return;
228         }
229
230         if(_methodSignature_ == oldChild)
231         {
232             setMethodSignature((PMethodSignature) newChild);
233             return;
234         }
235
236         if(_lParen_ == oldChild)
237         {
238             setLParen((TLParen) newChild);
239             return;
240         }
241
242         if(_argList_ == oldChild)
243         {
244             setArgList((PArgList) newChild);
245             return;
246         }
247
248         if(_rParen_ == oldChild)
249         {
250             setRParen((TRParen) newChild);
251             return;
252         }
253
254     }
255 }
256
Popular Tags