1 package spoon.examples.visitor.template; 2 3 import spoon.template.Local; 4 import spoon.template.Parameter; 5 import spoon.template.Template; 6 7 13 public class VisitorTemplate implements Template { 14 15 18 @Parameter 19 String _target_; 20 21 24 @Parameter 25 Class _Visitor_; 26 27 30 @Local 31 public VisitorTemplate(String target, Class visitorType) { 32 _target_ = target; 33 _Visitor_ = visitorType; 34 } 35 36 41 public void accept(_Visitor_ visitor) { 42 visitor.visit_target_(this); 43 } 44 45 } 46 | Popular Tags |