01: package spoon.vsuite.findbugs.template;
02:
03: import spoon.reflect.code.CtStatementList;
04: import spoon.reflect.reference.CtTypeReference;
05: import spoon.template.Local;
06: import spoon.template.Parameter;
07: import spoon.template.Template;
08:
09: public class CatcherTemplate implements Template {
10:
11: @Parameter
12: CtTypeReference<? extends Throwable> _T_;
13:
14: @Parameter
15: CtStatementList<?> lst;
16:
17: @Local
18: public CatcherTemplate(CtTypeReference<? extends Throwable> _t_,
19: CtStatementList<?> lst) {
20: super ();
21: _T_ = _t_;
22: this .lst = lst;
23: }
24:
25: @Local
26: public CatcherTemplate(CtTypeReference<? extends Throwable> _t_) {
27: super ();
28: _T_ = _t_;
29: }
30:
31: public void catcher() {
32: try {
33: lst.S();
34: } catch (_T_ e) {
35: e.printStackTrace();
36: }
37: }
38: }
|