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

changeset 0
373ffda63c9a
child 637
9c07ef4934dd
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/SimpleType_List.java	Wed Apr 27 01:27:09 2016 +0800
     1.3 @@ -0,0 +1,390 @@
     1.4 +/*
     1.5 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
     1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 + *
     1.8 + * This code is free software; you can redistribute it and/or modify it
     1.9 + * under the terms of the GNU General Public License version 2 only, as
    1.10 + * published by the Free Software Foundation.  Oracle designates this
    1.11 + * particular file as subject to the "Classpath" exception as provided
    1.12 + * by Oracle in the LICENSE file that accompanied this code.
    1.13 + *
    1.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
    1.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.17 + * version 2 for more details (a copy is included in the LICENSE file that
    1.18 + * accompanied this code).
    1.19 + *
    1.20 + * You should have received a copy of the GNU General Public License version
    1.21 + * 2 along with this work; if not, write to the Free Software Foundation,
    1.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.23 + *
    1.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.25 + * or visit www.oracle.com if you need additional information or have any
    1.26 + * questions.
    1.27 + */
    1.28 +
    1.29 +/* this file is generated by RelaxNGCC */
    1.30 +package com.sun.xml.internal.xsom.impl.parser.state;
    1.31 +import org.xml.sax.SAXException;
    1.32 +import org.xml.sax.XMLReader;
    1.33 +import org.xml.sax.Attributes;
    1.34 +import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
    1.35 +
    1.36 +    import com.sun.xml.internal.xsom.*;
    1.37 +    import com.sun.xml.internal.xsom.parser.*;
    1.38 +    import com.sun.xml.internal.xsom.impl.*;
    1.39 +    import com.sun.xml.internal.xsom.impl.parser.*;
    1.40 +    import org.xml.sax.Locator;
    1.41 +    import org.xml.sax.ContentHandler;
    1.42 +    import org.xml.sax.helpers.*;
    1.43 +    import java.util.*;
    1.44 +    import java.math.BigInteger;
    1.45 +
    1.46 +
    1.47 +
    1.48 +class SimpleType_List extends NGCCHandler {
    1.49 +    private Locator locator;
    1.50 +    private AnnotationImpl annotation;
    1.51 +    private String name;
    1.52 +    private UName itemTypeName;
    1.53 +    private Set finalSet;
    1.54 +    private ForeignAttributesImpl fa;
    1.55 +    protected final NGCCRuntimeEx $runtime;
    1.56 +    private int $_ngcc_current_state;
    1.57 +    protected String $uri;
    1.58 +    protected String $localName;
    1.59 +    protected String $qname;
    1.60 +
    1.61 +    public final NGCCRuntime getRuntime() {
    1.62 +        return($runtime);
    1.63 +    }
    1.64 +
    1.65 +    public SimpleType_List(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie, AnnotationImpl _annotation, Locator _locator, ForeignAttributesImpl _fa, String _name, Set _finalSet) {
    1.66 +        super(source, parent, cookie);
    1.67 +        $runtime = runtime;
    1.68 +        this.annotation = _annotation;
    1.69 +        this.locator = _locator;
    1.70 +        this.fa = _fa;
    1.71 +        this.name = _name;
    1.72 +        this.finalSet = _finalSet;
    1.73 +        $_ngcc_current_state = 10;
    1.74 +    }
    1.75 +
    1.76 +    public SimpleType_List(NGCCRuntimeEx runtime, AnnotationImpl _annotation, Locator _locator, ForeignAttributesImpl _fa, String _name, Set _finalSet) {
    1.77 +        this(null, runtime, runtime, -1, _annotation, _locator, _fa, _name, _finalSet);
    1.78 +    }
    1.79 +
    1.80 +    private void action0()throws SAXException {
    1.81 +
    1.82 +        result = new ListSimpleTypeImpl(
    1.83 +                $runtime.document, annotation, locator, fa,
    1.84 +                name, name==null, finalSet, itemType );
    1.85 +
    1.86 +}
    1.87 +
    1.88 +    private void action1()throws SAXException {
    1.89 +
    1.90 +                itemType = new DelayedRef.SimpleType(
    1.91 +                        $runtime, lloc, $runtime.currentSchema, itemTypeName);
    1.92 +
    1.93 +}
    1.94 +
    1.95 +    private void action2()throws SAXException {
    1.96 +        lloc=$runtime.copyLocator();
    1.97 +}
    1.98 +
    1.99 +    public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
   1.100 +        int $ai;
   1.101 +        $uri = $__uri;
   1.102 +        $localName = $__local;
   1.103 +        $qname = $__qname;
   1.104 +        switch($_ngcc_current_state) {
   1.105 +        case 9:
   1.106 +            {
   1.107 +                if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || ((($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")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))))) {
   1.108 +                    NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 266, fa);
   1.109 +                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
   1.110 +                }
   1.111 +                else {
   1.112 +                    unexpectedEnterElement($__qname);
   1.113 +                }
   1.114 +            }
   1.115 +            break;
   1.116 +        case 7:
   1.117 +            {
   1.118 +                if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
   1.119 +                    NGCCHandler h = new annotation(this, super._source, $runtime, 264, annotation,AnnotationContext.SIMPLETYPE_DECL);
   1.120 +                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
   1.121 +                }
   1.122 +                else {
   1.123 +                    $_ngcc_current_state = 2;
   1.124 +                    $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
   1.125 +                }
   1.126 +            }
   1.127 +            break;
   1.128 +        case 10:
   1.129 +            {
   1.130 +                if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("list"))) {
   1.131 +                    $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
   1.132 +                    action2();
   1.133 +                    $_ngcc_current_state = 9;
   1.134 +                }
   1.135 +                else {
   1.136 +                    unexpectedEnterElement($__qname);
   1.137 +                }
   1.138 +            }
   1.139 +            break;
   1.140 +        case 2:
   1.141 +            {
   1.142 +                if(($ai = $runtime.getAttributeIndex("","itemType"))>=0) {
   1.143 +                    $runtime.consumeAttribute($ai);
   1.144 +                    $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
   1.145 +                }
   1.146 +                else {
   1.147 +                    if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
   1.148 +                        NGCCHandler h = new simpleType(this, super._source, $runtime, 258);
   1.149 +                        spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
   1.150 +                    }
   1.151 +                    else {
   1.152 +                        unexpectedEnterElement($__qname);
   1.153 +                    }
   1.154 +                }
   1.155 +            }
   1.156 +            break;
   1.157 +        case 0:
   1.158 +            {
   1.159 +                revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
   1.160 +            }
   1.161 +            break;
   1.162 +        default:
   1.163 +            {
   1.164 +                unexpectedEnterElement($__qname);
   1.165 +            }
   1.166 +            break;
   1.167 +        }
   1.168 +    }
   1.169 +
   1.170 +    public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
   1.171 +        int $ai;
   1.172 +        $uri = $__uri;
   1.173 +        $localName = $__local;
   1.174 +        $qname = $__qname;
   1.175 +        switch($_ngcc_current_state) {
   1.176 +        case 9:
   1.177 +            {
   1.178 +                if((($ai = $runtime.getAttributeIndex("","itemType"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("list")))) {
   1.179 +                    NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 266, fa);
   1.180 +                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
   1.181 +                }
   1.182 +                else {
   1.183 +                    unexpectedLeaveElement($__qname);
   1.184 +                }
   1.185 +            }
   1.186 +            break;
   1.187 +        case 7:
   1.188 +            {
   1.189 +                $_ngcc_current_state = 2;
   1.190 +                $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
   1.191 +            }
   1.192 +            break;
   1.193 +        case 2:
   1.194 +            {
   1.195 +                if(($ai = $runtime.getAttributeIndex("","itemType"))>=0) {
   1.196 +                    $runtime.consumeAttribute($ai);
   1.197 +                    $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
   1.198 +                }
   1.199 +                else {
   1.200 +                    unexpectedLeaveElement($__qname);
   1.201 +                }
   1.202 +            }
   1.203 +            break;
   1.204 +        case 0:
   1.205 +            {
   1.206 +                revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
   1.207 +            }
   1.208 +            break;
   1.209 +        case 1:
   1.210 +            {
   1.211 +                if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("list"))) {
   1.212 +                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
   1.213 +                    $_ngcc_current_state = 0;
   1.214 +                    action0();
   1.215 +                }
   1.216 +                else {
   1.217 +                    unexpectedLeaveElement($__qname);
   1.218 +                }
   1.219 +            }
   1.220 +            break;
   1.221 +        default:
   1.222 +            {
   1.223 +                unexpectedLeaveElement($__qname);
   1.224 +            }
   1.225 +            break;
   1.226 +        }
   1.227 +    }
   1.228 +
   1.229 +    public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
   1.230 +        int $ai;
   1.231 +        $uri = $__uri;
   1.232 +        $localName = $__local;
   1.233 +        $qname = $__qname;
   1.234 +        switch($_ngcc_current_state) {
   1.235 +        case 9:
   1.236 +            {
   1.237 +                if(($__uri.equals("") && $__local.equals("itemType"))) {
   1.238 +                    NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 266, fa);
   1.239 +                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
   1.240 +                }
   1.241 +                else {
   1.242 +                    unexpectedEnterAttribute($__qname);
   1.243 +                }
   1.244 +            }
   1.245 +            break;
   1.246 +        case 7:
   1.247 +            {
   1.248 +                $_ngcc_current_state = 2;
   1.249 +                $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
   1.250 +            }
   1.251 +            break;
   1.252 +        case 2:
   1.253 +            {
   1.254 +                if(($__uri.equals("") && $__local.equals("itemType"))) {
   1.255 +                    $_ngcc_current_state = 5;
   1.256 +                }
   1.257 +                else {
   1.258 +                    unexpectedEnterAttribute($__qname);
   1.259 +                }
   1.260 +            }
   1.261 +            break;
   1.262 +        case 0:
   1.263 +            {
   1.264 +                revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
   1.265 +            }
   1.266 +            break;
   1.267 +        default:
   1.268 +            {
   1.269 +                unexpectedEnterAttribute($__qname);
   1.270 +            }
   1.271 +            break;
   1.272 +        }
   1.273 +    }
   1.274 +
   1.275 +    public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
   1.276 +        int $ai;
   1.277 +        $uri = $__uri;
   1.278 +        $localName = $__local;
   1.279 +        $qname = $__qname;
   1.280 +        switch($_ngcc_current_state) {
   1.281 +        case 7:
   1.282 +            {
   1.283 +                $_ngcc_current_state = 2;
   1.284 +                $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
   1.285 +            }
   1.286 +            break;
   1.287 +        case 0:
   1.288 +            {
   1.289 +                revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
   1.290 +            }
   1.291 +            break;
   1.292 +        case 4:
   1.293 +            {
   1.294 +                if(($__uri.equals("") && $__local.equals("itemType"))) {
   1.295 +                    $_ngcc_current_state = 1;
   1.296 +                }
   1.297 +                else {
   1.298 +                    unexpectedLeaveAttribute($__qname);
   1.299 +                }
   1.300 +            }
   1.301 +            break;
   1.302 +        default:
   1.303 +            {
   1.304 +                unexpectedLeaveAttribute($__qname);
   1.305 +            }
   1.306 +            break;
   1.307 +        }
   1.308 +    }
   1.309 +
   1.310 +    public void text(String $value) throws SAXException {
   1.311 +        int $ai;
   1.312 +        switch($_ngcc_current_state) {
   1.313 +        case 9:
   1.314 +            {
   1.315 +                if(($ai = $runtime.getAttributeIndex("","itemType"))>=0) {
   1.316 +                    NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 266, fa);
   1.317 +                    spawnChildFromText(h, $value);
   1.318 +                }
   1.319 +            }
   1.320 +            break;
   1.321 +        case 7:
   1.322 +            {
   1.323 +                $_ngcc_current_state = 2;
   1.324 +                $runtime.sendText(super._cookie, $value);
   1.325 +            }
   1.326 +            break;
   1.327 +        case 2:
   1.328 +            {
   1.329 +                if(($ai = $runtime.getAttributeIndex("","itemType"))>=0) {
   1.330 +                    $runtime.consumeAttribute($ai);
   1.331 +                    $runtime.sendText(super._cookie, $value);
   1.332 +                }
   1.333 +            }
   1.334 +            break;
   1.335 +        case 0:
   1.336 +            {
   1.337 +                revertToParentFromText(result, super._cookie, $value);
   1.338 +            }
   1.339 +            break;
   1.340 +        case 5:
   1.341 +            {
   1.342 +                NGCCHandler h = new qname(this, super._source, $runtime, 260);
   1.343 +                spawnChildFromText(h, $value);
   1.344 +            }
   1.345 +            break;
   1.346 +        }
   1.347 +    }
   1.348 +
   1.349 +    public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
   1.350 +        switch($__cookie__) {
   1.351 +        case 266:
   1.352 +            {
   1.353 +                fa = ((ForeignAttributesImpl)$__result__);
   1.354 +                $_ngcc_current_state = 7;
   1.355 +            }
   1.356 +            break;
   1.357 +        case 264:
   1.358 +            {
   1.359 +                annotation = ((AnnotationImpl)$__result__);
   1.360 +                $_ngcc_current_state = 2;
   1.361 +            }
   1.362 +            break;
   1.363 +        case 258:
   1.364 +            {
   1.365 +                itemType = ((SimpleTypeImpl)$__result__);
   1.366 +                $_ngcc_current_state = 1;
   1.367 +            }
   1.368 +            break;
   1.369 +        case 260:
   1.370 +            {
   1.371 +                itemTypeName = ((UName)$__result__);
   1.372 +                action1();
   1.373 +                $_ngcc_current_state = 4;
   1.374 +            }
   1.375 +            break;
   1.376 +        }
   1.377 +    }
   1.378 +
   1.379 +    public boolean accepted() {
   1.380 +        return(($_ngcc_current_state == 0));
   1.381 +    }
   1.382 +
   1.383 +
   1.384 +                /** computed simple type object */
   1.385 +                private ListSimpleTypeImpl result;
   1.386 +
   1.387 +                // reference to the base type
   1.388 +                private Ref.SimpleType itemType;
   1.389 +
   1.390 +                // locator of <list>
   1.391 +                private Locator lloc;
   1.392 +
   1.393 +}

mercurial