src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/SimpleType_Union.java

Fri, 23 Aug 2013 09:57:21 +0100

author
mkos
date
Fri, 23 Aug 2013 09:57:21 +0100
changeset 397
b99d7e355d4b
parent 286
f50545b5e2f1
child 637
9c07ef4934dd
permissions
-rw-r--r--

8022885: Update JAX-WS RI integration to 2.2.9-b14140
8013016: Rebase 8009009 against the latest jdk8/jaxws
Reviewed-by: alanb, chegar

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

mercurial