Tue, 06 Mar 2012 16:09:35 -0800
7150322: Stop using drop source bundles in jaxws
Reviewed-by: darcy, ohrstrom
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.tools.internal.jxc.gen.config; |
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.tools.internal.jxc.NGCCRuntimeEx; |
ohair@286 | 32 | import javax.xml.parsers.SAXParserFactory; |
ohair@286 | 33 | import org.xml.sax.XMLReader; |
ohair@286 | 34 | |
ohair@286 | 35 | import java.util.List; |
ohair@286 | 36 | import java.util.ArrayList; |
ohair@286 | 37 | import java.io.File; |
ohair@286 | 38 | |
ohair@286 | 39 | |
ohair@286 | 40 | public class Config extends NGCCHandler { |
ohair@286 | 41 | private String bd; |
ohair@286 | 42 | private Schema _schema; |
ohair@286 | 43 | protected final NGCCRuntimeEx $runtime; |
ohair@286 | 44 | private int $_ngcc_current_state; |
ohair@286 | 45 | protected String $uri; |
ohair@286 | 46 | protected String $localName; |
ohair@286 | 47 | protected String $qname; |
ohair@286 | 48 | |
ohair@286 | 49 | public final NGCCRuntime getRuntime() { |
ohair@286 | 50 | return($runtime); |
ohair@286 | 51 | } |
ohair@286 | 52 | |
ohair@286 | 53 | public Config(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) { |
ohair@286 | 54 | super(source, parent, cookie); |
ohair@286 | 55 | $runtime = runtime; |
ohair@286 | 56 | $_ngcc_current_state = 8; |
ohair@286 | 57 | } |
ohair@286 | 58 | |
ohair@286 | 59 | public Config(NGCCRuntimeEx runtime) { |
ohair@286 | 60 | this(null, runtime, runtime, -1); |
ohair@286 | 61 | } |
ohair@286 | 62 | |
ohair@286 | 63 | private void action0()throws SAXException { |
ohair@286 | 64 | this.schema.add (_schema); |
ohair@286 | 65 | } |
ohair@286 | 66 | |
ohair@286 | 67 | private void action1()throws SAXException { |
ohair@286 | 68 | baseDir = $runtime.getBaseDir(bd); |
ohair@286 | 69 | } |
ohair@286 | 70 | |
ohair@286 | 71 | public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException { |
ohair@286 | 72 | int $ai; |
ohair@286 | 73 | $uri = $__uri; |
ohair@286 | 74 | $localName = $__local; |
ohair@286 | 75 | $qname = $__qname; |
ohair@286 | 76 | switch($_ngcc_current_state) { |
ohair@286 | 77 | case 7: |
ohair@286 | 78 | { |
ohair@286 | 79 | if(($ai = $runtime.getAttributeIndex("","baseDir"))>=0) { |
ohair@286 | 80 | $runtime.consumeAttribute($ai); |
ohair@286 | 81 | $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); |
ohair@286 | 82 | } |
ohair@286 | 83 | else { |
ohair@286 | 84 | unexpectedEnterElement($__qname); |
ohair@286 | 85 | } |
ohair@286 | 86 | } |
ohair@286 | 87 | break; |
ohair@286 | 88 | case 0: |
ohair@286 | 89 | { |
ohair@286 | 90 | revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs); |
ohair@286 | 91 | } |
ohair@286 | 92 | break; |
ohair@286 | 93 | case 1: |
ohair@286 | 94 | { |
ohair@286 | 95 | if(($__uri.equals("") && $__local.equals("schema"))) { |
ohair@286 | 96 | NGCCHandler h = new Schema(this, super._source, $runtime, 31, baseDir); |
ohair@286 | 97 | spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs); |
ohair@286 | 98 | } |
ohair@286 | 99 | else { |
ohair@286 | 100 | unexpectedEnterElement($__qname); |
ohair@286 | 101 | } |
ohair@286 | 102 | } |
ohair@286 | 103 | break; |
ohair@286 | 104 | case 2: |
ohair@286 | 105 | { |
ohair@286 | 106 | if(($__uri.equals("") && $__local.equals("schema"))) { |
ohair@286 | 107 | NGCCHandler h = new Schema(this, super._source, $runtime, 32, baseDir); |
ohair@286 | 108 | spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs); |
ohair@286 | 109 | } |
ohair@286 | 110 | else { |
ohair@286 | 111 | $_ngcc_current_state = 1; |
ohair@286 | 112 | $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); |
ohair@286 | 113 | } |
ohair@286 | 114 | } |
ohair@286 | 115 | break; |
ohair@286 | 116 | case 8: |
ohair@286 | 117 | { |
ohair@286 | 118 | if(($__uri.equals("") && $__local.equals("config"))) { |
ohair@286 | 119 | $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs); |
ohair@286 | 120 | $_ngcc_current_state = 7; |
ohair@286 | 121 | } |
ohair@286 | 122 | else { |
ohair@286 | 123 | unexpectedEnterElement($__qname); |
ohair@286 | 124 | } |
ohair@286 | 125 | } |
ohair@286 | 126 | break; |
ohair@286 | 127 | case 4: |
ohair@286 | 128 | { |
ohair@286 | 129 | if(($__uri.equals("") && $__local.equals("classes"))) { |
ohair@286 | 130 | NGCCHandler h = new Classes(this, super._source, $runtime, 34); |
ohair@286 | 131 | spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs); |
ohair@286 | 132 | } |
ohair@286 | 133 | else { |
ohair@286 | 134 | unexpectedEnterElement($__qname); |
ohair@286 | 135 | } |
ohair@286 | 136 | } |
ohair@286 | 137 | break; |
ohair@286 | 138 | default: |
ohair@286 | 139 | { |
ohair@286 | 140 | unexpectedEnterElement($__qname); |
ohair@286 | 141 | } |
ohair@286 | 142 | break; |
ohair@286 | 143 | } |
ohair@286 | 144 | } |
ohair@286 | 145 | |
ohair@286 | 146 | public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException { |
ohair@286 | 147 | int $ai; |
ohair@286 | 148 | $uri = $__uri; |
ohair@286 | 149 | $localName = $__local; |
ohair@286 | 150 | $qname = $__qname; |
ohair@286 | 151 | switch($_ngcc_current_state) { |
ohair@286 | 152 | case 7: |
ohair@286 | 153 | { |
ohair@286 | 154 | if(($ai = $runtime.getAttributeIndex("","baseDir"))>=0) { |
ohair@286 | 155 | $runtime.consumeAttribute($ai); |
ohair@286 | 156 | $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); |
ohair@286 | 157 | } |
ohair@286 | 158 | else { |
ohair@286 | 159 | unexpectedLeaveElement($__qname); |
ohair@286 | 160 | } |
ohair@286 | 161 | } |
ohair@286 | 162 | break; |
ohair@286 | 163 | case 0: |
ohair@286 | 164 | { |
ohair@286 | 165 | revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname); |
ohair@286 | 166 | } |
ohair@286 | 167 | break; |
ohair@286 | 168 | case 1: |
ohair@286 | 169 | { |
ohair@286 | 170 | if(($__uri.equals("") && $__local.equals("config"))) { |
ohair@286 | 171 | $runtime.onLeaveElementConsumed($__uri, $__local, $__qname); |
ohair@286 | 172 | $_ngcc_current_state = 0; |
ohair@286 | 173 | } |
ohair@286 | 174 | else { |
ohair@286 | 175 | unexpectedLeaveElement($__qname); |
ohair@286 | 176 | } |
ohair@286 | 177 | } |
ohair@286 | 178 | break; |
ohair@286 | 179 | case 2: |
ohair@286 | 180 | { |
ohair@286 | 181 | $_ngcc_current_state = 1; |
ohair@286 | 182 | $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); |
ohair@286 | 183 | } |
ohair@286 | 184 | break; |
ohair@286 | 185 | default: |
ohair@286 | 186 | { |
ohair@286 | 187 | unexpectedLeaveElement($__qname); |
ohair@286 | 188 | } |
ohair@286 | 189 | break; |
ohair@286 | 190 | } |
ohair@286 | 191 | } |
ohair@286 | 192 | |
ohair@286 | 193 | public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException { |
ohair@286 | 194 | int $ai; |
ohair@286 | 195 | $uri = $__uri; |
ohair@286 | 196 | $localName = $__local; |
ohair@286 | 197 | $qname = $__qname; |
ohair@286 | 198 | switch($_ngcc_current_state) { |
ohair@286 | 199 | case 7: |
ohair@286 | 200 | { |
ohair@286 | 201 | if(($__uri.equals("") && $__local.equals("baseDir"))) { |
ohair@286 | 202 | $_ngcc_current_state = 6; |
ohair@286 | 203 | } |
ohair@286 | 204 | else { |
ohair@286 | 205 | unexpectedEnterAttribute($__qname); |
ohair@286 | 206 | } |
ohair@286 | 207 | } |
ohair@286 | 208 | break; |
ohair@286 | 209 | case 0: |
ohair@286 | 210 | { |
ohair@286 | 211 | revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname); |
ohair@286 | 212 | } |
ohair@286 | 213 | break; |
ohair@286 | 214 | case 2: |
ohair@286 | 215 | { |
ohair@286 | 216 | $_ngcc_current_state = 1; |
ohair@286 | 217 | $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname); |
ohair@286 | 218 | } |
ohair@286 | 219 | break; |
ohair@286 | 220 | default: |
ohair@286 | 221 | { |
ohair@286 | 222 | unexpectedEnterAttribute($__qname); |
ohair@286 | 223 | } |
ohair@286 | 224 | break; |
ohair@286 | 225 | } |
ohair@286 | 226 | } |
ohair@286 | 227 | |
ohair@286 | 228 | public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException { |
ohair@286 | 229 | int $ai; |
ohair@286 | 230 | $uri = $__uri; |
ohair@286 | 231 | $localName = $__local; |
ohair@286 | 232 | $qname = $__qname; |
ohair@286 | 233 | switch($_ngcc_current_state) { |
ohair@286 | 234 | case 0: |
ohair@286 | 235 | { |
ohair@286 | 236 | revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname); |
ohair@286 | 237 | } |
ohair@286 | 238 | break; |
ohair@286 | 239 | case 5: |
ohair@286 | 240 | { |
ohair@286 | 241 | if(($__uri.equals("") && $__local.equals("baseDir"))) { |
ohair@286 | 242 | $_ngcc_current_state = 4; |
ohair@286 | 243 | } |
ohair@286 | 244 | else { |
ohair@286 | 245 | unexpectedLeaveAttribute($__qname); |
ohair@286 | 246 | } |
ohair@286 | 247 | } |
ohair@286 | 248 | break; |
ohair@286 | 249 | case 2: |
ohair@286 | 250 | { |
ohair@286 | 251 | $_ngcc_current_state = 1; |
ohair@286 | 252 | $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname); |
ohair@286 | 253 | } |
ohair@286 | 254 | break; |
ohair@286 | 255 | default: |
ohair@286 | 256 | { |
ohair@286 | 257 | unexpectedLeaveAttribute($__qname); |
ohair@286 | 258 | } |
ohair@286 | 259 | break; |
ohair@286 | 260 | } |
ohair@286 | 261 | } |
ohair@286 | 262 | |
ohair@286 | 263 | public void text(String $value) throws SAXException { |
ohair@286 | 264 | int $ai; |
ohair@286 | 265 | switch($_ngcc_current_state) { |
ohair@286 | 266 | case 7: |
ohair@286 | 267 | { |
ohair@286 | 268 | if(($ai = $runtime.getAttributeIndex("","baseDir"))>=0) { |
ohair@286 | 269 | $runtime.consumeAttribute($ai); |
ohair@286 | 270 | $runtime.sendText(super._cookie, $value); |
ohair@286 | 271 | } |
ohair@286 | 272 | } |
ohair@286 | 273 | break; |
ohair@286 | 274 | case 0: |
ohair@286 | 275 | { |
ohair@286 | 276 | revertToParentFromText(this, super._cookie, $value); |
ohair@286 | 277 | } |
ohair@286 | 278 | break; |
ohair@286 | 279 | case 2: |
ohair@286 | 280 | { |
ohair@286 | 281 | $_ngcc_current_state = 1; |
ohair@286 | 282 | $runtime.sendText(super._cookie, $value); |
ohair@286 | 283 | } |
ohair@286 | 284 | break; |
ohair@286 | 285 | case 6: |
ohair@286 | 286 | { |
ohair@286 | 287 | bd = $value; |
ohair@286 | 288 | $_ngcc_current_state = 5; |
ohair@286 | 289 | action1(); |
ohair@286 | 290 | } |
ohair@286 | 291 | break; |
ohair@286 | 292 | } |
ohair@286 | 293 | } |
ohair@286 | 294 | |
ohair@286 | 295 | public void onChildCompleted(Object result, int cookie, boolean needAttCheck)throws SAXException { |
ohair@286 | 296 | switch(cookie) { |
ohair@286 | 297 | case 31: |
ohair@286 | 298 | { |
ohair@286 | 299 | this._schema = ((Schema)result); |
ohair@286 | 300 | action0(); |
ohair@286 | 301 | $_ngcc_current_state = 1; |
ohair@286 | 302 | } |
ohair@286 | 303 | break; |
ohair@286 | 304 | case 32: |
ohair@286 | 305 | { |
ohair@286 | 306 | this._schema = ((Schema)result); |
ohair@286 | 307 | action0(); |
ohair@286 | 308 | $_ngcc_current_state = 1; |
ohair@286 | 309 | } |
ohair@286 | 310 | break; |
ohair@286 | 311 | case 34: |
ohair@286 | 312 | { |
ohair@286 | 313 | this.classes = ((Classes)result); |
ohair@286 | 314 | $_ngcc_current_state = 2; |
ohair@286 | 315 | } |
ohair@286 | 316 | break; |
ohair@286 | 317 | } |
ohair@286 | 318 | } |
ohair@286 | 319 | |
ohair@286 | 320 | public boolean accepted() { |
ohair@286 | 321 | return(($_ngcc_current_state == 0)); |
ohair@286 | 322 | } |
ohair@286 | 323 | |
ohair@286 | 324 | |
ohair@286 | 325 | private File baseDir; |
ohair@286 | 326 | private Classes classes; |
ohair@286 | 327 | private List schema = new ArrayList(); |
ohair@286 | 328 | public Classes getClasses() { return this.classes;} |
ohair@286 | 329 | public File getBaseDir() { return baseDir;} |
ohair@286 | 330 | public List getSchema() { return this.schema;} |
ohair@286 | 331 | |
ohair@286 | 332 | } |