1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Config.java Wed Apr 27 01:27:09 2016 +0800 1.3 @@ -0,0 +1,336 @@ 1.4 +/* 1.5 + * Copyright (c) 1997, 2012, 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.tools.internal.jxc.gen.config; 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.tools.internal.jxc.NGCCRuntimeEx; 1.35 +import javax.xml.parsers.SAXParserFactory; 1.36 +import org.xml.sax.XMLReader; 1.37 + 1.38 +import java.util.List; 1.39 + import java.util.ArrayList; 1.40 + import java.io.File; 1.41 + 1.42 +/** 1.43 + * <p><b> 1.44 + * Auto-generated, do not edit. 1.45 + * </b></p> 1.46 + */ 1.47 +public class Config extends NGCCHandler { 1.48 + private String bd; 1.49 + private Schema _schema; 1.50 + protected final NGCCRuntimeEx $runtime; 1.51 + private int $_ngcc_current_state; 1.52 + protected String $uri; 1.53 + protected String $localName; 1.54 + protected String $qname; 1.55 + 1.56 + public final NGCCRuntime getRuntime() { 1.57 + return($runtime); 1.58 + } 1.59 + 1.60 + public Config(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) { 1.61 + super(source, parent, cookie); 1.62 + $runtime = runtime; 1.63 + $_ngcc_current_state = 8; 1.64 + } 1.65 + 1.66 + public Config(NGCCRuntimeEx runtime) { 1.67 + this(null, runtime, runtime, -1); 1.68 + } 1.69 + 1.70 + private void action0()throws SAXException { 1.71 + this.schema.add (_schema); 1.72 +} 1.73 + 1.74 + private void action1()throws SAXException { 1.75 + baseDir = $runtime.getBaseDir(bd); 1.76 +} 1.77 + 1.78 + public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException { 1.79 + int $ai; 1.80 + $uri = $__uri; 1.81 + $localName = $__local; 1.82 + $qname = $__qname; 1.83 + switch($_ngcc_current_state) { 1.84 + case 0: 1.85 + { 1.86 + revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs); 1.87 + } 1.88 + break; 1.89 + case 1: 1.90 + { 1.91 + if(($__uri.equals("") && $__local.equals("schema"))) { 1.92 + NGCCHandler h = new Schema(this, super._source, $runtime, 19, baseDir); 1.93 + spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs); 1.94 + } 1.95 + else { 1.96 + unexpectedEnterElement($__qname); 1.97 + } 1.98 + } 1.99 + break; 1.100 + case 8: 1.101 + { 1.102 + if(($__uri.equals("") && $__local.equals("config"))) { 1.103 + $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs); 1.104 + $_ngcc_current_state = 7; 1.105 + } 1.106 + else { 1.107 + unexpectedEnterElement($__qname); 1.108 + } 1.109 + } 1.110 + break; 1.111 + case 4: 1.112 + { 1.113 + if(($__uri.equals("") && $__local.equals("classes"))) { 1.114 + NGCCHandler h = new Classes(this, super._source, $runtime, 22); 1.115 + spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs); 1.116 + } 1.117 + else { 1.118 + unexpectedEnterElement($__qname); 1.119 + } 1.120 + } 1.121 + break; 1.122 + case 2: 1.123 + { 1.124 + if(($__uri.equals("") && $__local.equals("schema"))) { 1.125 + NGCCHandler h = new Schema(this, super._source, $runtime, 20, baseDir); 1.126 + spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs); 1.127 + } 1.128 + else { 1.129 + $_ngcc_current_state = 1; 1.130 + $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); 1.131 + } 1.132 + } 1.133 + break; 1.134 + case 7: 1.135 + { 1.136 + if(($ai = $runtime.getAttributeIndex("","baseDir"))>=0) { 1.137 + $runtime.consumeAttribute($ai); 1.138 + $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); 1.139 + } 1.140 + else { 1.141 + unexpectedEnterElement($__qname); 1.142 + } 1.143 + } 1.144 + break; 1.145 + default: 1.146 + { 1.147 + unexpectedEnterElement($__qname); 1.148 + } 1.149 + break; 1.150 + } 1.151 + } 1.152 + 1.153 + public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException { 1.154 + int $ai; 1.155 + $uri = $__uri; 1.156 + $localName = $__local; 1.157 + $qname = $__qname; 1.158 + switch($_ngcc_current_state) { 1.159 + case 0: 1.160 + { 1.161 + revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname); 1.162 + } 1.163 + break; 1.164 + case 1: 1.165 + { 1.166 + if(($__uri.equals("") && $__local.equals("config"))) { 1.167 + $runtime.onLeaveElementConsumed($__uri, $__local, $__qname); 1.168 + $_ngcc_current_state = 0; 1.169 + } 1.170 + else { 1.171 + unexpectedLeaveElement($__qname); 1.172 + } 1.173 + } 1.174 + break; 1.175 + case 2: 1.176 + { 1.177 + $_ngcc_current_state = 1; 1.178 + $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); 1.179 + } 1.180 + break; 1.181 + case 7: 1.182 + { 1.183 + if(($ai = $runtime.getAttributeIndex("","baseDir"))>=0) { 1.184 + $runtime.consumeAttribute($ai); 1.185 + $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); 1.186 + } 1.187 + else { 1.188 + unexpectedLeaveElement($__qname); 1.189 + } 1.190 + } 1.191 + break; 1.192 + default: 1.193 + { 1.194 + unexpectedLeaveElement($__qname); 1.195 + } 1.196 + break; 1.197 + } 1.198 + } 1.199 + 1.200 + public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException { 1.201 + int $ai; 1.202 + $uri = $__uri; 1.203 + $localName = $__local; 1.204 + $qname = $__qname; 1.205 + switch($_ngcc_current_state) { 1.206 + case 0: 1.207 + { 1.208 + revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname); 1.209 + } 1.210 + break; 1.211 + case 2: 1.212 + { 1.213 + $_ngcc_current_state = 1; 1.214 + $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname); 1.215 + } 1.216 + break; 1.217 + case 7: 1.218 + { 1.219 + if(($__uri.equals("") && $__local.equals("baseDir"))) { 1.220 + $_ngcc_current_state = 6; 1.221 + } 1.222 + else { 1.223 + unexpectedEnterAttribute($__qname); 1.224 + } 1.225 + } 1.226 + break; 1.227 + default: 1.228 + { 1.229 + unexpectedEnterAttribute($__qname); 1.230 + } 1.231 + break; 1.232 + } 1.233 + } 1.234 + 1.235 + public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException { 1.236 + int $ai; 1.237 + $uri = $__uri; 1.238 + $localName = $__local; 1.239 + $qname = $__qname; 1.240 + switch($_ngcc_current_state) { 1.241 + case 0: 1.242 + { 1.243 + revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname); 1.244 + } 1.245 + break; 1.246 + case 5: 1.247 + { 1.248 + if(($__uri.equals("") && $__local.equals("baseDir"))) { 1.249 + $_ngcc_current_state = 4; 1.250 + } 1.251 + else { 1.252 + unexpectedLeaveAttribute($__qname); 1.253 + } 1.254 + } 1.255 + break; 1.256 + case 2: 1.257 + { 1.258 + $_ngcc_current_state = 1; 1.259 + $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname); 1.260 + } 1.261 + break; 1.262 + default: 1.263 + { 1.264 + unexpectedLeaveAttribute($__qname); 1.265 + } 1.266 + break; 1.267 + } 1.268 + } 1.269 + 1.270 + public void text(String $value) throws SAXException { 1.271 + int $ai; 1.272 + switch($_ngcc_current_state) { 1.273 + case 0: 1.274 + { 1.275 + revertToParentFromText(this, super._cookie, $value); 1.276 + } 1.277 + break; 1.278 + case 6: 1.279 + { 1.280 + bd = $value; 1.281 + $_ngcc_current_state = 5; 1.282 + action1(); 1.283 + } 1.284 + break; 1.285 + case 2: 1.286 + { 1.287 + $_ngcc_current_state = 1; 1.288 + $runtime.sendText(super._cookie, $value); 1.289 + } 1.290 + break; 1.291 + case 7: 1.292 + { 1.293 + if(($ai = $runtime.getAttributeIndex("","baseDir"))>=0) { 1.294 + $runtime.consumeAttribute($ai); 1.295 + $runtime.sendText(super._cookie, $value); 1.296 + } 1.297 + } 1.298 + break; 1.299 + } 1.300 + } 1.301 + 1.302 + public void onChildCompleted(Object result, int cookie, boolean needAttCheck)throws SAXException { 1.303 + switch(cookie) { 1.304 + case 19: 1.305 + { 1.306 + this._schema = ((Schema)result); 1.307 + action0(); 1.308 + $_ngcc_current_state = 1; 1.309 + } 1.310 + break; 1.311 + case 22: 1.312 + { 1.313 + this.classes = ((Classes)result); 1.314 + $_ngcc_current_state = 2; 1.315 + } 1.316 + break; 1.317 + case 20: 1.318 + { 1.319 + this._schema = ((Schema)result); 1.320 + action0(); 1.321 + $_ngcc_current_state = 1; 1.322 + } 1.323 + break; 1.324 + } 1.325 + } 1.326 + 1.327 + public boolean accepted() { 1.328 + return(($_ngcc_current_state == 0)); 1.329 + } 1.330 + 1.331 + 1.332 + private File baseDir; 1.333 + private Classes classes; 1.334 + private List schema = new ArrayList(); 1.335 + public Classes getClasses() { return this.classes;} 1.336 + public File getBaseDir() { return baseDir;} 1.337 + public List getSchema() { return this.schema;} 1.338 + 1.339 +}