Tue, 06 Mar 2012 16:09:35 -0800
7150322: Stop using drop source bundles in jaxws
Reviewed-by: darcy, ohrstrom
1 /*
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
26 /* this file is generated by RelaxNGCC */
27 package com.sun.xml.internal.xsom.impl.parser.state;
28 import org.xml.sax.SAXException;
29 import org.xml.sax.XMLReader;
30 import org.xml.sax.Attributes;
31 import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
33 import com.sun.xml.internal.xsom.*;
34 import com.sun.xml.internal.xsom.parser.*;
35 import com.sun.xml.internal.xsom.impl.*;
36 import com.sun.xml.internal.xsom.impl.parser.*;
37 import org.xml.sax.Locator;
38 import org.xml.sax.ContentHandler;
39 import org.xml.sax.helpers.*;
40 import java.util.*;
41 import java.math.BigInteger;
45 class SimpleType_List extends NGCCHandler {
46 private Locator locator;
47 private AnnotationImpl annotation;
48 private String name;
49 private UName itemTypeName;
50 private Set finalSet;
51 private ForeignAttributesImpl fa;
52 protected final NGCCRuntimeEx $runtime;
53 private int $_ngcc_current_state;
54 protected String $uri;
55 protected String $localName;
56 protected String $qname;
58 public final NGCCRuntime getRuntime() {
59 return($runtime);
60 }
62 public SimpleType_List(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie, AnnotationImpl _annotation, Locator _locator, ForeignAttributesImpl _fa, String _name, Set _finalSet) {
63 super(source, parent, cookie);
64 $runtime = runtime;
65 this.annotation = _annotation;
66 this.locator = _locator;
67 this.fa = _fa;
68 this.name = _name;
69 this.finalSet = _finalSet;
70 $_ngcc_current_state = 10;
71 }
73 public SimpleType_List(NGCCRuntimeEx runtime, AnnotationImpl _annotation, Locator _locator, ForeignAttributesImpl _fa, String _name, Set _finalSet) {
74 this(null, runtime, runtime, -1, _annotation, _locator, _fa, _name, _finalSet);
75 }
77 private void action0()throws SAXException {
79 result = new ListSimpleTypeImpl(
80 $runtime.document, annotation, locator, fa,
81 name, name==null, finalSet, itemType );
83 }
85 private void action1()throws SAXException {
87 itemType = new DelayedRef.SimpleType(
88 $runtime, lloc, $runtime.currentSchema, itemTypeName);
90 }
92 private void action2()throws SAXException {
93 lloc=$runtime.copyLocator();
94 }
96 public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
97 int $ai;
98 $uri = $__uri;
99 $localName = $__local;
100 $qname = $__qname;
101 switch($_ngcc_current_state) {
102 case 7:
103 {
104 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
105 NGCCHandler h = new annotation(this, super._source, $runtime, 693, annotation,AnnotationContext.SIMPLETYPE_DECL);
106 spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
107 }
108 else {
109 $_ngcc_current_state = 2;
110 $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
111 }
112 }
113 break;
114 case 0:
115 {
116 revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
117 }
118 break;
119 case 2:
120 {
121 if(($ai = $runtime.getAttributeIndex("","itemType"))>=0) {
122 $runtime.consumeAttribute($ai);
123 $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
124 }
125 else {
126 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
127 NGCCHandler h = new simpleType(this, super._source, $runtime, 687);
128 spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
129 }
130 else {
131 unexpectedEnterElement($__qname);
132 }
133 }
134 }
135 break;
136 case 9:
137 {
138 if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || (($ai = $runtime.getAttributeIndex("","itemType"))>=0 && (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))))))) {
139 NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 695, fa);
140 spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
141 }
142 else {
143 unexpectedEnterElement($__qname);
144 }
145 }
146 break;
147 case 10:
148 {
149 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("list"))) {
150 $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
151 action2();
152 $_ngcc_current_state = 9;
153 }
154 else {
155 unexpectedEnterElement($__qname);
156 }
157 }
158 break;
159 default:
160 {
161 unexpectedEnterElement($__qname);
162 }
163 break;
164 }
165 }
167 public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
168 int $ai;
169 $uri = $__uri;
170 $localName = $__local;
171 $qname = $__qname;
172 switch($_ngcc_current_state) {
173 case 1:
174 {
175 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("list"))) {
176 $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
177 $_ngcc_current_state = 0;
178 action0();
179 }
180 else {
181 unexpectedLeaveElement($__qname);
182 }
183 }
184 break;
185 case 7:
186 {
187 $_ngcc_current_state = 2;
188 $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
189 }
190 break;
191 case 0:
192 {
193 revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
194 }
195 break;
196 case 2:
197 {
198 if(($ai = $runtime.getAttributeIndex("","itemType"))>=0) {
199 $runtime.consumeAttribute($ai);
200 $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
201 }
202 else {
203 unexpectedLeaveElement($__qname);
204 }
205 }
206 break;
207 case 9:
208 {
209 if((($ai = $runtime.getAttributeIndex("","itemType"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("list")))) {
210 NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 695, fa);
211 spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
212 }
213 else {
214 unexpectedLeaveElement($__qname);
215 }
216 }
217 break;
218 default:
219 {
220 unexpectedLeaveElement($__qname);
221 }
222 break;
223 }
224 }
226 public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
227 int $ai;
228 $uri = $__uri;
229 $localName = $__local;
230 $qname = $__qname;
231 switch($_ngcc_current_state) {
232 case 7:
233 {
234 $_ngcc_current_state = 2;
235 $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
236 }
237 break;
238 case 0:
239 {
240 revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
241 }
242 break;
243 case 2:
244 {
245 if(($__uri.equals("") && $__local.equals("itemType"))) {
246 $_ngcc_current_state = 5;
247 }
248 else {
249 unexpectedEnterAttribute($__qname);
250 }
251 }
252 break;
253 case 9:
254 {
255 if(($__uri.equals("") && $__local.equals("itemType"))) {
256 NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 695, fa);
257 spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
258 }
259 else {
260 unexpectedEnterAttribute($__qname);
261 }
262 }
263 break;
264 default:
265 {
266 unexpectedEnterAttribute($__qname);
267 }
268 break;
269 }
270 }
272 public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
273 int $ai;
274 $uri = $__uri;
275 $localName = $__local;
276 $qname = $__qname;
277 switch($_ngcc_current_state) {
278 case 4:
279 {
280 if(($__uri.equals("") && $__local.equals("itemType"))) {
281 $_ngcc_current_state = 1;
282 }
283 else {
284 unexpectedLeaveAttribute($__qname);
285 }
286 }
287 break;
288 case 7:
289 {
290 $_ngcc_current_state = 2;
291 $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
292 }
293 break;
294 case 0:
295 {
296 revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
297 }
298 break;
299 default:
300 {
301 unexpectedLeaveAttribute($__qname);
302 }
303 break;
304 }
305 }
307 public void text(String $value) throws SAXException {
308 int $ai;
309 switch($_ngcc_current_state) {
310 case 7:
311 {
312 $_ngcc_current_state = 2;
313 $runtime.sendText(super._cookie, $value);
314 }
315 break;
316 case 0:
317 {
318 revertToParentFromText(result, super._cookie, $value);
319 }
320 break;
321 case 2:
322 {
323 if(($ai = $runtime.getAttributeIndex("","itemType"))>=0) {
324 $runtime.consumeAttribute($ai);
325 $runtime.sendText(super._cookie, $value);
326 }
327 }
328 break;
329 case 9:
330 {
331 if(($ai = $runtime.getAttributeIndex("","itemType"))>=0) {
332 NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 695, fa);
333 spawnChildFromText(h, $value);
334 }
335 }
336 break;
337 case 5:
338 {
339 NGCCHandler h = new qname(this, super._source, $runtime, 689);
340 spawnChildFromText(h, $value);
341 }
342 break;
343 }
344 }
346 public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
347 switch($__cookie__) {
348 case 693:
349 {
350 annotation = ((AnnotationImpl)$__result__);
351 $_ngcc_current_state = 2;
352 }
353 break;
354 case 687:
355 {
356 itemType = ((SimpleTypeImpl)$__result__);
357 $_ngcc_current_state = 1;
358 }
359 break;
360 case 695:
361 {
362 fa = ((ForeignAttributesImpl)$__result__);
363 $_ngcc_current_state = 7;
364 }
365 break;
366 case 689:
367 {
368 itemTypeName = ((UName)$__result__);
369 action1();
370 $_ngcc_current_state = 4;
371 }
372 break;
373 }
374 }
376 public boolean accepted() {
377 return(($_ngcc_current_state == 0));
378 }
381 /** computed simple type object */
382 private ListSimpleTypeImpl result;
384 // reference to the base type
385 private Ref.SimpleType itemType;
387 // locator of <list>
388 private Locator lloc;
390 }