001: /* this file is generated by RelaxNGCC */
002: package com.sun.tools.jxc.gen.config;
003:
004: import org.xml.sax.SAXException;
005: import org.xml.sax.Attributes;
006: import com.sun.tools.jxc.NGCCRuntimeEx;
007:
008: import java.util.List;
009: import java.util.ArrayList;
010:
011: public class Classes extends NGCCHandler {
012: private String __text;
013: private String exclude_content;
014: private String include_content;
015: protected final NGCCRuntimeEx $runtime;
016: private int $_ngcc_current_state;
017: protected String $uri;
018: protected String $localName;
019: protected String $qname;
020:
021: public final NGCCRuntime getRuntime() {
022: return ($runtime);
023: }
024:
025: public Classes(NGCCHandler parent, NGCCEventSource source,
026: NGCCRuntimeEx runtime, int cookie) {
027: super (source, parent, cookie);
028: $runtime = runtime;
029: $_ngcc_current_state = 12;
030: }
031:
032: public Classes(NGCCRuntimeEx runtime) {
033: this (null, runtime, runtime, -1);
034: }
035:
036: private void action0() throws SAXException {
037: this .excludes.add(exclude_content);
038: }
039:
040: private void action1() throws SAXException {
041: $runtime.processList(__text);
042: }
043:
044: private void action2() throws SAXException {
045: this .includes.add(include_content);
046: }
047:
048: private void action3() throws SAXException {
049: $runtime.processList(__text);
050: }
051:
052: public void enterElement(String $__uri, String $__local,
053: String $__qname, Attributes $attrs) throws SAXException {
054: $uri = $__uri;
055: $localName = $__local;
056: $qname = $__qname;
057: switch ($_ngcc_current_state) {
058: case 12: {
059: if (($__uri == "" && $__local == "classes")) {
060: $runtime.onEnterElementConsumed($__uri, $__local,
061: $__qname, $attrs);
062: $_ngcc_current_state = 11;
063: } else {
064: unexpectedEnterElement($__qname);
065: }
066: }
067: break;
068: case 4: {
069: $_ngcc_current_state = 3;
070: $runtime.sendEnterElement(super ._cookie, $__uri, $__local,
071: $__qname, $attrs);
072: }
073: break;
074: case 2: {
075: if (($__uri == "" && $__local == "excludes")) {
076: $runtime.onEnterElementConsumed($__uri, $__local,
077: $__qname, $attrs);
078: $_ngcc_current_state = 6;
079: } else {
080: $_ngcc_current_state = 1;
081: $runtime.sendEnterElement(super ._cookie, $__uri,
082: $__local, $__qname, $attrs);
083: }
084: }
085: break;
086: case 11: {
087: if (($__uri == "" && $__local == "includes")) {
088: $runtime.onEnterElementConsumed($__uri, $__local,
089: $__qname, $attrs);
090: $_ngcc_current_state = 10;
091: } else {
092: unexpectedEnterElement($__qname);
093: }
094: }
095: break;
096: case 0: {
097: revertToParentFromEnterElement(this , super ._cookie, $__uri,
098: $__local, $__qname, $attrs);
099: }
100: break;
101: default: {
102: unexpectedEnterElement($__qname);
103: }
104: break;
105: }
106: }
107:
108: public void leaveElement(String $__uri, String $__local,
109: String $__qname) throws SAXException {
110: $uri = $__uri;
111: $localName = $__local;
112: $qname = $__qname;
113: switch ($_ngcc_current_state) {
114: case 3: {
115: if (($__uri == "" && $__local == "excludes")) {
116: $runtime.onLeaveElementConsumed($__uri, $__local,
117: $__qname);
118: $_ngcc_current_state = 1;
119: } else {
120: unexpectedLeaveElement($__qname);
121: }
122: }
123: break;
124: case 4: {
125: $_ngcc_current_state = 3;
126: $runtime.sendLeaveElement(super ._cookie, $__uri, $__local,
127: $__qname);
128: }
129: break;
130: case 2: {
131: $_ngcc_current_state = 1;
132: $runtime.sendLeaveElement(super ._cookie, $__uri, $__local,
133: $__qname);
134: }
135: break;
136: case 1: {
137: if (($__uri == "" && $__local == "classes")) {
138: $runtime.onLeaveElementConsumed($__uri, $__local,
139: $__qname);
140: $_ngcc_current_state = 0;
141: } else {
142: unexpectedLeaveElement($__qname);
143: }
144: }
145: break;
146: case 8: {
147: if (($__uri == "" && $__local == "includes")) {
148: $runtime.onLeaveElementConsumed($__uri, $__local,
149: $__qname);
150: $_ngcc_current_state = 2;
151: } else {
152: unexpectedLeaveElement($__qname);
153: }
154: }
155: break;
156: case 0: {
157: revertToParentFromLeaveElement(this , super ._cookie, $__uri,
158: $__local, $__qname);
159: }
160: break;
161: default: {
162: unexpectedLeaveElement($__qname);
163: }
164: break;
165: }
166: }
167:
168: public void enterAttribute(String $__uri, String $__local,
169: String $__qname) throws SAXException {
170: $uri = $__uri;
171: $localName = $__local;
172: $qname = $__qname;
173: switch ($_ngcc_current_state) {
174: case 4: {
175: $_ngcc_current_state = 3;
176: $runtime.sendEnterAttribute(super ._cookie, $__uri,
177: $__local, $__qname);
178: }
179: break;
180: case 2: {
181: $_ngcc_current_state = 1;
182: $runtime.sendEnterAttribute(super ._cookie, $__uri,
183: $__local, $__qname);
184: }
185: break;
186: case 0: {
187: revertToParentFromEnterAttribute(this , super ._cookie,
188: $__uri, $__local, $__qname);
189: }
190: break;
191: default: {
192: unexpectedEnterAttribute($__qname);
193: }
194: break;
195: }
196: }
197:
198: public void leaveAttribute(String $__uri, String $__local,
199: String $__qname) throws SAXException {
200: $uri = $__uri;
201: $localName = $__local;
202: $qname = $__qname;
203: switch ($_ngcc_current_state) {
204: case 4: {
205: $_ngcc_current_state = 3;
206: $runtime.sendLeaveAttribute(super ._cookie, $__uri,
207: $__local, $__qname);
208: }
209: break;
210: case 2: {
211: $_ngcc_current_state = 1;
212: $runtime.sendLeaveAttribute(super ._cookie, $__uri,
213: $__local, $__qname);
214: }
215: break;
216: case 0: {
217: revertToParentFromLeaveAttribute(this , super ._cookie,
218: $__uri, $__local, $__qname);
219: }
220: break;
221: default: {
222: unexpectedLeaveAttribute($__qname);
223: }
224: break;
225: }
226: }
227:
228: public void text(String $value) throws SAXException {
229: switch ($_ngcc_current_state) {
230: case 9: {
231: include_content = $value;
232: $_ngcc_current_state = 8;
233: action2();
234: }
235: break;
236: case 3: {
237: exclude_content = $value;
238: $_ngcc_current_state = 3;
239: action0();
240: }
241: break;
242: case 4: {
243: exclude_content = $value;
244: $_ngcc_current_state = 3;
245: action0();
246: }
247: break;
248: case 2: {
249: $_ngcc_current_state = 1;
250: $runtime.sendText(super ._cookie, $value);
251: }
252: break;
253: case 10: {
254: __text = $value;
255: $_ngcc_current_state = 9;
256: action3();
257: }
258: break;
259: case 8: {
260: include_content = $value;
261: $_ngcc_current_state = 8;
262: action2();
263: }
264: break;
265: case 6: {
266: __text = $value;
267: $_ngcc_current_state = 4;
268: action1();
269: }
270: break;
271: case 0: {
272: revertToParentFromText(this , super ._cookie, $value);
273: }
274: break;
275: }
276: }
277:
278: public void onChildCompleted(Object $__result__, int $__cookie__,
279: boolean $__needAttCheck__) throws SAXException {
280: switch ($__cookie__) {
281: }
282: }
283:
284: public boolean accepted() {
285: return (($_ngcc_current_state == 0));
286: }
287:
288: private List includes = new ArrayList();
289:
290: public List getIncludes() {
291: return $runtime.getIncludePatterns(this .includes);
292: }
293:
294: private List excludes = new ArrayList();
295:
296: public List getExcludes() {
297: return $runtime.getExcludePatterns(this.excludes);
298: }
299:
300: }
|