001: /*******************************************************************************
002: * Copyright (c) 2000, 2006 IBM Corporation and others.
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * IBM Corporation - initial API and implementation
010: *******************************************************************************/package org.eclipse.jdt.core.util;
011:
012: /**
013: * Description of a Java opcodes visitor. This should be used to walk the opcodes
014: * of a ICodeAttribute.
015: *
016: * This interface is not intended to be implemented by clients. Clients must subclass
017: * {@link ByteCodeVisitorAdapter} to define an implementation of this interface.
018: *
019: * @since 2.0
020: */
021: public interface IBytecodeVisitor {
022:
023: void _aaload(int pc);
024:
025: void _aastore(int pc);
026:
027: void _aconst_null(int pc);
028:
029: void _aload(int pc, int index);
030:
031: void _aload_0(int pc);
032:
033: void _aload_1(int pc);
034:
035: void _aload_2(int pc);
036:
037: void _aload_3(int pc);
038:
039: void _anewarray(int pc, int index, IConstantPoolEntry constantClass);
040:
041: void _areturn(int pc);
042:
043: void _arraylength(int pc);
044:
045: void _astore(int pc, int index);
046:
047: void _astore_0(int pc);
048:
049: void _astore_1(int pc);
050:
051: void _astore_2(int pc);
052:
053: void _astore_3(int pc);
054:
055: void _athrow(int pc);
056:
057: void _baload(int pc);
058:
059: void _bastore(int pc);
060:
061: void _bipush(int pc, byte _byte);
062:
063: void _caload(int pc);
064:
065: void _castore(int pc);
066:
067: void _checkcast(int pc, int index, IConstantPoolEntry constantClass);
068:
069: void _d2f(int pc);
070:
071: void _d2i(int pc);
072:
073: void _d2l(int pc);
074:
075: void _dadd(int pc);
076:
077: void _daload(int pc);
078:
079: void _dastore(int pc);
080:
081: void _dcmpg(int pc);
082:
083: void _dcmpl(int pc);
084:
085: void _dconst_0(int pc);
086:
087: void _dconst_1(int pc);
088:
089: void _ddiv(int pc);
090:
091: void _dload(int pc, int index);
092:
093: void _dload_0(int pc);
094:
095: void _dload_1(int pc);
096:
097: void _dload_2(int pc);
098:
099: void _dload_3(int pc);
100:
101: void _dmul(int pc);
102:
103: void _dneg(int pc);
104:
105: void _drem(int pc);
106:
107: void _dreturn(int pc);
108:
109: void _dstore(int pc, int index);
110:
111: void _dstore_0(int pc);
112:
113: void _dstore_1(int pc);
114:
115: void _dstore_2(int pc);
116:
117: void _dstore_3(int pc);
118:
119: void _dsub(int pc);
120:
121: void _dup(int pc);
122:
123: void _dup_x1(int pc);
124:
125: void _dup_x2(int pc);
126:
127: void _dup2(int pc);
128:
129: void _dup2_x1(int pc);
130:
131: void _dup2_x2(int pc);
132:
133: void _f2d(int pc);
134:
135: void _f2i(int pc);
136:
137: void _f2l(int pc);
138:
139: void _fadd(int pc);
140:
141: void _faload(int pc);
142:
143: void _fastore(int pc);
144:
145: void _fcmpg(int pc);
146:
147: void _fcmpl(int pc);
148:
149: void _fconst_0(int pc);
150:
151: void _fconst_1(int pc);
152:
153: void _fconst_2(int pc);
154:
155: void _fdiv(int pc);
156:
157: void _fload(int pc, int index);
158:
159: void _fload_0(int pc);
160:
161: void _fload_1(int pc);
162:
163: void _fload_2(int pc);
164:
165: void _fload_3(int pc);
166:
167: void _fmul(int pc);
168:
169: void _fneg(int pc);
170:
171: void _frem(int pc);
172:
173: void _freturn(int pc);
174:
175: void _fstore(int pc, int index);
176:
177: void _fstore_0(int pc);
178:
179: void _fstore_1(int pc);
180:
181: void _fstore_2(int pc);
182:
183: void _fstore_3(int pc);
184:
185: void _fsub(int pc);
186:
187: void _getfield(int pc, int index,
188: IConstantPoolEntry constantFieldref);
189:
190: void _getstatic(int pc, int index,
191: IConstantPoolEntry constantFieldref);
192:
193: void _goto(int pc, int branchOffset);
194:
195: void _goto_w(int pc, int branchOffset);
196:
197: void _i2b(int pc);
198:
199: void _i2c(int pc);
200:
201: void _i2d(int pc);
202:
203: void _i2f(int pc);
204:
205: void _i2l(int pc);
206:
207: void _i2s(int pc);
208:
209: void _iadd(int pc);
210:
211: void _iaload(int pc);
212:
213: void _iand(int pc);
214:
215: void _iastore(int pc);
216:
217: void _iconst_m1(int pc);
218:
219: void _iconst_0(int pc);
220:
221: void _iconst_1(int pc);
222:
223: void _iconst_2(int pc);
224:
225: void _iconst_3(int pc);
226:
227: void _iconst_4(int pc);
228:
229: void _iconst_5(int pc);
230:
231: void _idiv(int pc);
232:
233: void _if_acmpeq(int pc, int branchOffset);
234:
235: void _if_acmpne(int pc, int branchOffset);
236:
237: void _if_icmpeq(int pc, int branchOffset);
238:
239: void _if_icmpne(int pc, int branchOffset);
240:
241: void _if_icmplt(int pc, int branchOffset);
242:
243: void _if_icmpge(int pc, int branchOffset);
244:
245: void _if_icmpgt(int pc, int branchOffset);
246:
247: void _if_icmple(int pc, int branchOffset);
248:
249: void _ifeq(int pc, int branchOffset);
250:
251: void _ifne(int pc, int branchOffset);
252:
253: void _iflt(int pc, int branchOffset);
254:
255: void _ifge(int pc, int branchOffset);
256:
257: void _ifgt(int pc, int branchOffset);
258:
259: void _ifle(int pc, int branchOffset);
260:
261: void _ifnonnull(int pc, int branchOffset);
262:
263: void _ifnull(int pc, int branchOffset);
264:
265: void _iinc(int pc, int index, int _const);
266:
267: void _iload(int pc, int index);
268:
269: void _iload_0(int pc);
270:
271: void _iload_1(int pc);
272:
273: void _iload_2(int pc);
274:
275: void _iload_3(int pc);
276:
277: void _imul(int pc);
278:
279: void _ineg(int pc);
280:
281: void _instanceof (int pc, int index, IConstantPoolEntry constantClass);
282:
283: void _invokeinterface(int pc, int index, byte nargs,
284: IConstantPoolEntry constantInterfaceMethodref);
285:
286: void _invokespecial(int pc, int index,
287: IConstantPoolEntry constantMethodref);
288:
289: void _invokestatic(int pc, int index,
290: IConstantPoolEntry constantMethodref);
291:
292: void _invokevirtual(int pc, int index,
293: IConstantPoolEntry constantMethodref);
294:
295: void _ior(int pc);
296:
297: void _irem(int pc);
298:
299: void _ireturn(int pc);
300:
301: void _ishl(int pc);
302:
303: void _ishr(int pc);
304:
305: void _istore(int pc, int index);
306:
307: void _istore_0(int pc);
308:
309: void _istore_1(int pc);
310:
311: void _istore_2(int pc);
312:
313: void _istore_3(int pc);
314:
315: void _isub(int pc);
316:
317: void _iushr(int pc);
318:
319: void _ixor(int pc);
320:
321: void _jsr(int pc, int branchOffset);
322:
323: void _jsr_w(int pc, int branchOffset);
324:
325: void _l2d(int pc);
326:
327: void _l2f(int pc);
328:
329: void _l2i(int pc);
330:
331: void _ladd(int pc);
332:
333: void _laload(int pc);
334:
335: void _land(int pc);
336:
337: void _lastore(int pc);
338:
339: void _lcmp(int pc);
340:
341: void _lconst_0(int pc);
342:
343: void _lconst_1(int pc);
344:
345: void _ldc(int pc, int index, IConstantPoolEntry constantPoolEntry);
346:
347: void _ldc_w(int pc, int index, IConstantPoolEntry constantPoolEntry);
348:
349: void _ldc2_w(int pc, int index, IConstantPoolEntry constantPoolEntry);
350:
351: void _ldiv(int pc);
352:
353: void _lload(int pc, int index);
354:
355: void _lload_0(int pc);
356:
357: void _lload_1(int pc);
358:
359: void _lload_2(int pc);
360:
361: void _lload_3(int pc);
362:
363: void _lmul(int pc);
364:
365: void _lneg(int pc);
366:
367: void _lookupswitch(int pc, int defaultoffset, int npairs,
368: int[][] offset_pairs);
369:
370: void _lor(int pc);
371:
372: void _lrem(int pc);
373:
374: void _lreturn(int pc);
375:
376: void _lshl(int pc);
377:
378: void _lshr(int pc);
379:
380: void _lstore(int pc, int index);
381:
382: void _lstore_0(int pc);
383:
384: void _lstore_1(int pc);
385:
386: void _lstore_2(int pc);
387:
388: void _lstore_3(int pc);
389:
390: void _lsub(int pc);
391:
392: void _lushr(int pc);
393:
394: void _lxor(int pc);
395:
396: void _monitorenter(int pc);
397:
398: void _monitorexit(int pc);
399:
400: void _multianewarray(int pc, int index, int dimensions,
401: IConstantPoolEntry constantClass);
402:
403: void _new(int pc, int index, IConstantPoolEntry constantClass);
404:
405: void _newarray(int pc, int atype);
406:
407: void _nop(int pc);
408:
409: void _pop(int pc);
410:
411: void _pop2(int pc);
412:
413: void _putfield(int pc, int index,
414: IConstantPoolEntry constantFieldref);
415:
416: void _putstatic(int pc, int index,
417: IConstantPoolEntry constantFieldref);
418:
419: void _ret(int pc, int index);
420:
421: void _return(int pc);
422:
423: void _saload(int pc);
424:
425: void _sastore(int pc);
426:
427: void _sipush(int pc, short value);
428:
429: void _swap(int pc);
430:
431: void _tableswitch(int pc, int defaultoffset, int low, int high,
432: int[] jump_offsets);
433:
434: void _wide(int pc, int opcode, int index);
435:
436: void _wide(int pc, int iincopcode, int index, int _const);
437:
438: void _breakpoint(int pc);
439:
440: void _impdep1(int pc);
441:
442: void _impdep2(int pc);
443: }
|