01: /*
02: @license.text@
03: */
04: package com.pavelvlasov.util.samples;
05:
06: import java.util.HashMap;
07:
08: import biz.hammurapi.util.ClassHierarchyVisitable;
09: import biz.hammurapi.util.Visitor;
10:
11: /**
12: * @author Pavel Vlasov
13: * @revision $Revision$
14: */
15: public class ClassHierarchyVisitableSample {
16:
17: public static void main(String[] args) {
18: ClassHierarchyVisitable visitable = new ClassHierarchyVisitable(
19: HashMap.class);
20: visitable.accept(new Visitor() {
21:
22: public boolean visit(Object target) {
23: System.out.println(target);
24: return true;
25: }
26:
27: });
28: }
29: }
|