01: package org.kohsuke.rngom.ast.builder;
02:
03: import org.kohsuke.rngom.ast.om.Location;
04: import org.kohsuke.rngom.ast.om.ParsedElementAnnotation;
05: import org.kohsuke.rngom.ast.om.ParsedNameClass;
06:
07: import java.util.List;
08:
09: /**
10: *
11: * @author
12: * Kohsuke Kawaguchi (kk@kohsuke.org)
13: */
14: public interface NameClassBuilder<N extends ParsedNameClass, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> {
15:
16: N annotate(N nc, A anno) throws BuildException;
17:
18: N annotateAfter(N nc, E e) throws BuildException;
19:
20: N commentAfter(N nc, CL comments) throws BuildException;
21:
22: N makeChoice(List<N> nameClasses, L loc, A anno);
23:
24: // should be handled by parser - KK
25: // static final String INHERIT_NS = new String("#inherit");
26:
27: // similarly, xmlns:* attribute should be rejected by the parser -KK
28:
29: N makeName(String ns, String localName, String prefix, L loc, A anno);
30:
31: N makeNsName(String ns, L loc, A anno);
32:
33: /**
34: * Caller must enforce constraints on except.
35: */
36: N makeNsName(String ns, N except, L loc, A anno);
37:
38: N makeAnyName(L loc, A anno);
39:
40: /**
41: * Caller must enforce constraints on except.
42: */
43: N makeAnyName(N except, L loc, A anno);
44:
45: N makeErrorNameClass();
46: }
|