KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > go > trove > classfile > FilteredCodeAssembler


1 /* ====================================================================
2  * Trove - Copyright (c) 1997-2000 Walt Disney Internet Group
3  * ====================================================================
4  * The Tea Software License, Version 1.1
5  *
6  * Copyright (c) 2000 Walt Disney Internet Group. All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in
17  * the documentation and/or other materials provided with the
18  * distribution.
19  *
20  * 3. The end-user documentation included with the redistribution,
21  * if any, must include the following acknowledgment:
22  * "This product includes software developed by the
23  * Walt Disney Internet Group (http://opensource.go.com/)."
24  * Alternately, this acknowledgment may appear in the software itself,
25  * if and wherever such third-party acknowledgments normally appear.
26  *
27  * 4. The names "Tea", "TeaServlet", "Kettle", "Trove" and "BeanDoc" must
28  * not be used to endorse or promote products derived from this
29  * software without prior written permission. For written
30  * permission, please contact opensource@dig.com.
31  *
32  * 5. Products derived from this software may not be called "Tea",
33  * "TeaServlet", "Kettle" or "Trove", nor may "Tea", "TeaServlet",
34  * "Kettle", "Trove" or "BeanDoc" appear in their name, without prior
35  * written permission of the Walt Disney Internet Group.
36  *
37  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
38  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
39  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
40  * DISCLAIMED. IN NO EVENT SHALL THE WALT DISNEY INTERNET GROUP OR ITS
41  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
42  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
43  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
44  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
45  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
46  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
47  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
48  * ====================================================================
49  *
50  * For more information about Tea, please see http://opensource.go.com/.
51  */

52
53 package com.go.trove.classfile;
54
55 /******************************************************************************
56  *
57  * @author Brian S O'Neill
58  * @version
59  * <!--$$Revision:--> 10 <!-- $-->, <!--$$JustDate:--> 9/07/00 <!-- $-->
60  */

61 public class FilteredCodeAssembler implements CodeAssembler {
62     protected final CodeAssembler mAssembler;
63
64     public FilteredCodeAssembler(CodeAssembler assembler) {
65         mAssembler = assembler;
66     }
67
68     public LocalVariable[] getParameters() {
69         return mAssembler.getParameters();
70     }
71
72     public LocalVariable createLocalVariable(String JavaDoc name,
73                                              TypeDescriptor type) {
74         return mAssembler.createLocalVariable(name, type);
75     }
76
77     public Label createLabel() {
78         return mAssembler.createLabel();
79     }
80
81     public void exceptionHandler(Location startLocation,
82                                  Location endLocation,
83                                  String JavaDoc catchClassName) {
84         mAssembler.exceptionHandler
85             (startLocation, endLocation, catchClassName);
86     }
87     
88     public void mapLineNumber(int lineNumber) {
89         mAssembler.mapLineNumber(lineNumber);
90     }
91
92     public void loadConstant(String JavaDoc value) {
93         mAssembler.loadConstant(value);
94     }
95
96     public void loadConstant(boolean value) {
97         mAssembler.loadConstant(value);
98     }
99
100     public void loadConstant(int value) {
101         mAssembler.loadConstant(value);
102     }
103
104     public void loadConstant(long value) {
105         mAssembler.loadConstant(value);
106     }
107
108     public void loadConstant(float value) {
109         mAssembler.loadConstant(value);
110     }
111
112     public void loadConstant(double value) {
113         mAssembler.loadConstant(value);
114     }
115
116     public void loadLocal(LocalVariable local) {
117         mAssembler.loadLocal(local);
118     }
119
120     public void loadThis() {
121         mAssembler.loadThis();
122     }
123
124     public void storeLocal(LocalVariable local) {
125         mAssembler.storeLocal(local);
126     }
127
128     public void loadFromArray(Class JavaDoc type) {
129         mAssembler.loadFromArray(type);
130     }
131
132     public void storeToArray(Class JavaDoc type) {
133         mAssembler.storeToArray(type);
134     }
135
136     public void loadField(String JavaDoc fieldName,
137                           TypeDescriptor type) {
138         mAssembler.loadField(fieldName, type);
139     }
140
141     public void loadField(String JavaDoc className,
142                           String JavaDoc fieldName,
143                           TypeDescriptor type) {
144         mAssembler.loadField(className, fieldName, type);
145     }
146
147     public void loadStaticField(String JavaDoc fieldName,
148                                 TypeDescriptor type) {
149         mAssembler.loadStaticField(fieldName, type);
150     }
151
152     public void loadStaticField(String JavaDoc className,
153                                 String JavaDoc fieldName,
154                                 TypeDescriptor type) {
155         mAssembler.loadStaticField(className, fieldName, type);
156     }
157
158     public void storeField(String JavaDoc fieldName,
159                            TypeDescriptor type) {
160         mAssembler.storeField(fieldName, type);
161     }
162
163     public void storeField(String JavaDoc className,
164                            String JavaDoc fieldName,
165                            TypeDescriptor type) {
166         mAssembler.storeField(className, fieldName, type);
167     }
168
169     public void storeStaticField(String JavaDoc fieldName,
170                                  TypeDescriptor type) {
171         mAssembler.storeStaticField(fieldName, type);
172     }
173
174     public void storeStaticField(String JavaDoc className,
175                                  String JavaDoc fieldName,
176                                  TypeDescriptor type) {
177         mAssembler.storeStaticField(className, fieldName, type);
178     }
179
180     public void returnVoid() {
181         mAssembler.returnVoid();
182     }
183
184     public void returnValue(Class JavaDoc type) {
185         mAssembler.returnValue(type);
186     }
187
188     public void convert(Class JavaDoc fromType, Class JavaDoc toType) {
189         mAssembler.convert(fromType, toType);
190     }
191
192     public void invokeVirtual(String JavaDoc methodName,
193                               TypeDescriptor ret,
194                               TypeDescriptor[] params) {
195         mAssembler.invokeVirtual(methodName, ret, params);
196     }
197
198     public void invokeVirtual(String JavaDoc className,
199                               String JavaDoc methodName,
200                               TypeDescriptor ret,
201                               TypeDescriptor[] params) {
202         mAssembler.invokeVirtual(className, methodName, ret, params);
203     }
204
205     public void invokeStatic(String JavaDoc methodName,
206                              TypeDescriptor ret,
207                              TypeDescriptor[] params) {
208         mAssembler.invokeStatic(methodName, ret, params);
209     }
210
211     public void invokeStatic(String JavaDoc className,
212                              String JavaDoc methodName,
213                              TypeDescriptor ret,
214                              TypeDescriptor[] params) {
215         mAssembler.invokeStatic(className, methodName, ret, params);
216     }
217
218     public void invokeInterface(String JavaDoc className,
219                                 String JavaDoc methodName,
220                                 TypeDescriptor ret,
221                                 TypeDescriptor[] params) {
222         mAssembler.invokeInterface(className, methodName, ret, params);
223     }
224
225     public void invokePrivate(String JavaDoc methodName,
226                               TypeDescriptor ret,
227                               TypeDescriptor[] params) {
228         mAssembler.invokePrivate(methodName, ret, params);
229     }
230
231     public void invokeSuper(String JavaDoc superClassName,
232                             String JavaDoc methodName,
233                             TypeDescriptor ret,
234                             TypeDescriptor[] params) {
235         mAssembler.invokeSuper(superClassName, methodName, ret, params);
236     }
237
238     public void invokeConstructor(TypeDescriptor[] params) {
239         mAssembler.invokeConstructor(params);
240     }
241
242     public void invokeConstructor(String JavaDoc className, TypeDescriptor[] params) {
243         mAssembler.invokeConstructor(className, params);
244     }
245
246     public void invokeSuperConstructor(TypeDescriptor[] params) {
247         mAssembler.invokeSuperConstructor(params);
248     }
249
250     public void newObject(TypeDescriptor type) {
251         mAssembler.newObject(type);
252     }
253
254     public void dup() {
255         mAssembler.dup();
256     }
257
258     public void dupX1() {
259         mAssembler.dupX1();
260     }
261
262     public void dupX2() {
263         mAssembler.dupX2();
264     }
265
266     public void dup2() {
267         mAssembler.dup2();
268     }
269
270     public void dup2X1() {
271         mAssembler.dup2X1();
272     }
273
274     public void dup2X2() {
275         mAssembler.dup2X2();
276     }
277
278     public void pop() {
279         mAssembler.pop();
280     }
281
282     public void pop2() {
283         mAssembler.pop2();
284     }
285
286     public void swap() {
287         mAssembler.swap();
288     }
289
290     public void swap2() {
291         mAssembler.swap2();
292     }
293
294     public void branch(Location location) {
295         mAssembler.branch(location);
296     }
297
298     public void ifNullBranch(Location location, boolean choice) {
299         mAssembler.ifNullBranch(location, choice);
300     }
301
302     public void ifEqualBranch(Location location, boolean choice) {
303         mAssembler.ifEqualBranch(location, choice);
304     }
305
306     public void ifZeroComparisonBranch(Location location, String JavaDoc choice)
307         throws IllegalArgumentException JavaDoc {
308         mAssembler.ifZeroComparisonBranch(location, choice);
309     }
310
311     public void ifComparisonBranch(Location location, String JavaDoc choice)
312         throws IllegalArgumentException JavaDoc {
313         mAssembler.ifComparisonBranch(location, choice);
314     }
315
316     public void switchBranch(int[] cases,
317                              Location[] locations, Location defaultLocation) {
318         mAssembler.switchBranch(cases, locations, defaultLocation);
319     }
320
321     public void jsr(Location location) {
322         mAssembler.jsr(location);
323     }
324
325     public void ret(LocalVariable local) {
326         mAssembler.ret(local);
327     }
328
329     public void math(byte opcode) {
330         mAssembler.math(opcode);
331     }
332
333     public void arrayLength() {
334         mAssembler.arrayLength();
335     }
336
337     public void throwObject() {
338         mAssembler.throwObject();
339     }
340
341     public void checkCast(TypeDescriptor type) {
342         mAssembler.checkCast(type);
343     }
344
345     public void instanceOf(TypeDescriptor type) {
346         mAssembler.instanceOf(type);
347     }
348
349     public void integerIncrement(LocalVariable local, int amount) {
350         mAssembler.integerIncrement(local, amount);
351     }
352
353     public void monitorEnter() {
354         mAssembler.monitorEnter();
355     }
356
357     public void monitorExit() {
358         mAssembler.monitorExit();
359     }
360
361     public void nop() {
362         mAssembler.nop();
363     }
364
365     public void breakpoint() {
366         mAssembler.breakpoint();
367     }
368 }
369
Popular Tags