Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/techtrader/modules/tools/bytecode/visitor/BCVisitor.java


1   package com.techtrader.modules.tools.bytecode.visitor;
2   
3   
4   import com.techtrader.modules.tools.bytecode.*;
5   import com.techtrader.modules.tools.bytecode.lowlevel.*;
6   
7   
8   /**
9    *  Base class for visitors on a bytecode class.  The public visit
10   *  method will traverse the object graph of the given entity, calling the
11   *  enter* and exit* methods as it visits each object.  The traversal
12   *  is done depth-first.  Subclasses should override only the methods
13   *  for visiting the entities they are interested in.  Whenever there is
14   *  a general method (i.e.  enter/exitEntry) as well as a more specific one
15   *  (i.e. enter/exitStringEntry), the more general method will be called first,
16   *  followed by a call on the correct specific method.  Most subclasses will
17   *  override either the general or specific cases, but not both.
18   *
19   *  @author    Abe White
20   */
21  public class BCVisitor
22  {
23    /**
24     *  Visit the given entity.
25     */
26    public void visit (VisitAcceptor obj)
27    {
28      if (obj == null)
29        return;
30  
31      obj.acceptVisit (this);
32    }
33  
34  
35    public void enterBCClass (BCClass obj)
36    {
37    }
38  
39  
40    public void exitBCClass (BCClass obj)
41    {
42    }
43  
44  
45    public void enterBCField (BCField obj)
46    {
47    }
48  
49  
50    public void exitBCField (BCField obj)
51    {
52    }
53  
54  
55    public void enterBCMethod (BCMethod obj)
56    {
57    }
58  
59  
60    public void exitBCMethod (BCMethod obj)
61    {
62    }
63  
64  
65    public void enterAttribute (Attribute obj)
66    {
67    }
68  
69  
70    public void exitAttribute (Attribute obj)
71    {
72    }
73  
74  
75    public void enterConstantValueAttribute (ConstantValueAttribute obj)
76    {
77    }
78  
79  
80    public void exitConstantValueAttribute (ConstantValueAttribute obj)
81    {
82    }
83  
84  
85    public void enterDeprecatedAttribute (DeprecatedAttribute obj)
86    {
87    }
88  
89  
90    public void exitDeprecatedAttribute (DeprecatedAttribute obj)
91    {
92    }
93  
94  
95    public void enterExceptionsAttribute (ExceptionsAttribute obj)
96    {
97    }
98  
99  
100   public void exitExceptionsAttribute (ExceptionsAttribute obj)
101   {
102   }
103 
104 
105   public void enterInnerClassesAttribute (InnerClassesAttribute obj)
106   {
107   }
108 
109 
110   public void exitInnerClassesAttribute (InnerClassesAttribute obj)
111   {
112   }
113 
114 
115   public void enterLineNumberTableAttribute (LineNumberTableAttribute obj)
116   {
117   }
118 
119 
120   public void exitLineNumberTableAttribute (LineNumberTableAttribute obj)
121   {
122   }
123 
124 
125   public void enterLocalVariableTableAttribute 
126     (LocalVariableTableAttribute obj)
127   {
128   }
129 
130 
131   public void exitLocalVariableTableAttribute 
132     (LocalVariableTableAttribute obj)
133   {
134   }
135 
136 
137   public void enterSourceFileAttribute (SourceFileAttribute obj)
138   {
139   }
140 
141 
142   public void exitSourceFileAttribute (SourceFileAttribute obj)
143   {
144   }
145 
146 
147   public void enterSyntheticAttribute (SyntheticAttribute obj)
148   {
149   }
150 
151 
152   public void exitSyntheticAttribute (SyntheticAttribute obj)
153   {
154   }
155 
156 
157   public void enterUnknownAttribute (UnknownAttribute obj)
158   {
159   }
160 
161 
162   public void exitUnknownAttribute (UnknownAttribute obj)
163   {
164   }
165 
166 
167   public void enterCode (Code obj)
168   {
169   }
170 
171 
172   public void exitCode (Code obj)
173   {
174   }
175 
176 
177   public void enterExceptionHandler (ExceptionHandler obj)
178   {
179   }
180 
181 
182   public void exitExceptionHandler (ExceptionHandler obj)
183   {
184   }
185 
186 
187   public void enterInnerClass (InnerClass obj)
188   {
189   }
190 
191 
192   public void exitInnerClass (InnerClass obj)
193   {
194   }
195 
196 
197   public void enterLineNumber (LineNumber obj)
198   {
199   }
200 
201 
202   public void exitLineNumber (LineNumber obj)
203   {
204   }
205 
206 
207   public void enterLocalVariable (LocalVariable obj)
208   {
209   }
210 
211 
212   public void exitLocalVariable (LocalVariable obj)
213   {
214   }
215 
216 
217   public void enterInstruction (Instruction obj)
218   {
219   }
220 
221 
222   public void exitInstruction (Instruction obj)
223   {
224   }
225 
226 
227   public void enterArrayLoadInstruction (ArrayLoadInstruction obj)
228   {
229   }
230 
231 
232   public void exitArrayLoadInstruction (ArrayLoadInstruction obj)
233   {
234   }
235 
236 
237   public void enterArrayStoreInstruction (ArrayStoreInstruction obj)
238   {
239   }
240 
241 
242   public void exitArrayStoreInstruction (ArrayStoreInstruction obj)
243   {
244   }
245 
246 
247   public void enterClassInstruction (ClassInstruction obj)
248   {
249   }
250 
251 
252   public void exitClassInstruction (ClassInstruction obj)
253   {
254   }
255 
256 
257   public void enterConstantInstruction (ConstantInstruction obj)
258   {
259   }
260 
261 
262   public void exitConstantInstruction (ConstantInstruction obj)
263   {
264   }
265 
266 
267   public void enterConvertInstruction (ConvertInstruction obj)
268   {
269   }
270 
271 
272   public void exitConvertInstruction (ConvertInstruction obj)
273   {
274   }
275 
276 
277   public void enterGetFieldInstruction (GetFieldInstruction obj)
278   {
279   }
280 
281 
282   public void exitGetFieldInstruction (GetFieldInstruction obj)
283   {
284   }
285 
286 
287   public void enterIIncInstruction (IIncInstruction obj)
288   {
289   }
290 
291 
292   public void exitIIncInstruction (IIncInstruction obj)
293   {
294   }
295 
296 
297   public void enterJumpInstruction (JumpInstruction obj)
298   {
299   }
300 
301 
302   public void exitJumpInstruction (JumpInstruction obj)
303   {
304   }
305 
306 
307   public void enterLoadInstruction (LoadInstruction obj)
308   {
309   }
310 
311 
312   public void exitLoadInstruction (LoadInstruction obj)
313   {
314   }
315 
316 
317   public void enterLookupSwitchInstruction (LookupSwitchInstruction obj)
318   {
319   }
320 
321 
322   public void exitLookupSwitchInstruction (LookupSwitchInstruction obj)
323   {
324   }
325 
326 
327   public void enterMathInstruction (MathInstruction obj)
328   {
329   }
330 
331 
332   public void exitMathInstruction (MathInstruction obj)
333   {
334   }
335 
336 
337   public void enterMethodInstruction (MethodInstruction obj)
338   {
339   }
340 
341 
342   public void exitMethodInstruction (MethodInstruction obj)
343   {
344   }
345 
346 
347   public void enterMultiANewArrayInstruction (MultiANewArrayInstruction obj)
348   {
349   }
350 
351 
352   public void exitMultiANewArrayInstruction (MultiANewArrayInstruction obj)
353   {
354   }
355 
356 
357   public void enterNewArrayInstruction (NewArrayInstruction obj)
358   {
359   }
360 
361 
362   public void exitNewArrayInstruction (NewArrayInstruction obj)
363   {
364   }
365 
366 
367   public void enterPutFieldInstruction (PutFieldInstruction obj)
368   {
369   }
370 
371 
372   public void exitPutFieldInstruction (PutFieldInstruction obj)
373   {
374   }
375 
376 
377   public void enterRetInstruction (RetInstruction obj)
378   {
379   }
380 
381 
382   public void exitRetInstruction (RetInstruction obj)
383   {
384   }
385 
386 
387   public void enterReturnInstruction (ReturnInstruction obj)
388   {
389   }
390 
391 
392   public void exitReturnInstruction (ReturnInstruction obj)
393   {
394   }
395 
396 
397   public void enterStackInstruction (StackInstruction obj)
398   {
399   }
400 
401 
402   public void exitStackInstruction (StackInstruction obj)
403   {
404   }
405 
406 
407   public void enterStoreInstruction (StoreInstruction obj)
408   {
409   }
410 
411 
412   public void exitStoreInstruction (StoreInstruction obj)
413   {
414   }
415 
416 
417   public void enterTableSwitchInstruction (TableSwitchInstruction obj)
418   {
419   }
420 
421 
422   public void exitTableSwitchInstruction (TableSwitchInstruction obj)
423   {
424   }
425 
426 
427   public void enterWideInstruction (WideInstruction obj)
428   {
429   }
430 
431 
432   public void exitWideInstruction (WideInstruction obj)
433   {
434   }
435 
436 
437   public void enterMonitorEnterInstruction (MonitorEnterInstruction obj)
438   {
439   }
440 
441 
442   public void exitMonitorEnterInstruction (MonitorEnterInstruction obj)
443   {
444   }
445 
446 
447   public void enterMonitorExitInstruction (MonitorExitInstruction obj)
448   {
449   }
450 
451 
452   public void exitMonitorExitInstruction (MonitorExitInstruction obj)
453   {
454   }
455 
456 
457   public void enterCmpInstruction (CmpInstruction obj)
458   {
459   }
460 
461 
462   public void exitCmpInstruction (CmpInstruction obj)
463   {
464   }
465 
466 
467   public void enterConstantPool (ConstantPool obj)
468   {
469   }
470 
471 
472   public void exitConstantPool (ConstantPool obj)
473   {
474   }
475 
476 
477   public void enterEntry (Entry obj)
478   {
479   }
480 
481 
482   public void exitEntry (Entry obj)
483   {
484   }
485 
486 
487   public void enterClassEntry (ClassEntry obj)
488   {
489   }
490 
491 
492   public void exitClassEntry (ClassEntry obj)
493   {
494   }
495 
496 
497   public void enterDoubleEntry (DoubleEntry obj)
498   {
499   }
500 
501 
502   public void exitDoubleEntry (DoubleEntry obj)
503   {
504   }
505 
506 
507   public void enterFieldEntry (FieldEntry obj)
508   {
509   }
510 
511 
512   public void exitFieldEntry (FieldEntry obj)
513   {
514   }
515 
516 
517   public void enterFloatEntry (FloatEntry obj)
518   {
519   }
520 
521 
522   public void exitFloatEntry (FloatEntry obj)
523   {
524   }
525 
526 
527   public void enterIntEntry (IntEntry obj)
528   {
529   }
530 
531 
532   public void exitIntEntry (IntEntry obj)
533   {
534   }
535 
536 
537   public void enterInterfaceMethodEntry (InterfaceMethodEntry obj)
538   {
539   }
540 
541 
542   public void exitInterfaceMethodEntry (InterfaceMethodEntry obj)
543   {
544   }
545 
546 
547   public void enterLongEntry (LongEntry obj)
548   {
549   }
550 
551 
552   public void exitLongEntry (LongEntry obj)
553   {
554   }
555 
556 
557   public void enterMethodEntry (MethodEntry obj)
558   {
559   }
560 
561 
562   public void exitMethodEntry (MethodEntry obj)
563   {
564   }
565 
566 
567   public void enterNameAndTypeEntry (NameAndTypeEntry obj)
568   {
569   }
570 
571 
572   public void exitNameAndTypeEntry (NameAndTypeEntry obj)
573   {
574   }
575 
576 
577   public void enterPlaceHolderEntry (PlaceHolderEntry obj)
578   {
579   }
580 
581 
582   public void exitPlaceHolderEntry (PlaceHolderEntry obj)
583   {
584   }
585 
586 
587   public void enterStringEntry (StringEntry obj)
588   {
589   }
590 
591 
592   public void exitStringEntry (StringEntry obj)
593   {
594   }
595 
596 
597   public void enterUTF8Entry (UTF8Entry obj)
598   {
599   }
600 
601 
602   public void exitUTF8Entry (UTF8Entry obj)
603   {
604   }
605 }