01: package org.kohsuke.rngom.nc;
02:
03: import javax.xml.namespace.QName;
04:
05: /**
06: * Visitor pattern over {@link NameClass} and its subclasses.
07: */
08: public interface NameClassVisitor<V> {
09: /**
10: * Called for {@link ChoiceNameClass}
11: */
12: V visitChoice(NameClass nc1, NameClass nc2);
13:
14: /**
15: * Called for {@link NsNameClass}
16: */
17: V visitNsName(String ns);
18:
19: /**
20: * Called for {@link NsNameExceptNameClass}
21: */
22: V visitNsNameExcept(String ns, NameClass nc);
23:
24: /**
25: * Called for {@link NameClass#ANY}
26: */
27: V visitAnyName();
28:
29: /**
30: * Called for {@link AnyNameExceptNameClass}
31: */
32: V visitAnyNameExcept(NameClass nc);
33:
34: /**
35: * Called for {@link SimpleNameClass}
36: */
37: V visitName(QName name);
38:
39: /**
40: * Called for {@link NameClass#NULL}.
41: */
42: V visitNull();
43: }
|