Fri, 23 Aug 2013 09:57:21 +0100
8022885: Update JAX-WS RI integration to 2.2.9-b14140
8013016: Rebase 8009009 against the latest jdk8/jaxws
Reviewed-by: alanb, chegar
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;
43 import com.sun.xml.internal.xsom.parser.AnnotationParser;
46 class annotation extends NGCCHandler {
47 private AnnotationContext context;
48 private AnnotationImpl existing;
49 protected final NGCCRuntimeEx $runtime;
50 private int $_ngcc_current_state;
51 protected String $uri;
52 protected String $localName;
53 protected String $qname;
55 public final NGCCRuntime getRuntime() {
56 return($runtime);
57 }
59 public annotation(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie, AnnotationImpl _existing, AnnotationContext _context) {
60 super(source, parent, cookie);
61 $runtime = runtime;
62 this.existing = _existing;
63 this.context = _context;
64 $_ngcc_current_state = 2;
65 }
67 public annotation(NGCCRuntimeEx runtime, AnnotationImpl _existing, AnnotationContext _context) {
68 this(null, runtime, runtime, -1, _existing, _context);
69 }
71 private void action0()throws SAXException {
73 locator = $runtime.copyLocator();
74 parser = $runtime.createAnnotationParser();
75 $runtime.redirectSubtree(parser.getContentHandler(
76 context,
77 $runtime.getAnnotationContextElementName(),
78 $runtime.getErrorHandler(),
79 $runtime.parser.getEntityResolver()
80 ), $uri, $localName, $qname );
82 }
84 public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
85 int $ai;
86 $uri = $__uri;
87 $localName = $__local;
88 $qname = $__qname;
89 switch($_ngcc_current_state) {
90 case 0:
91 {
92 revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
93 }
94 break;
95 case 2:
96 {
97 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
98 $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
99 action0();
100 $_ngcc_current_state = 1;
101 }
102 else {
103 unexpectedEnterElement($__qname);
104 }
105 }
106 break;
107 default:
108 {
109 unexpectedEnterElement($__qname);
110 }
111 break;
112 }
113 }
115 public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
116 int $ai;
117 $uri = $__uri;
118 $localName = $__local;
119 $qname = $__qname;
120 switch($_ngcc_current_state) {
121 case 1:
122 {
123 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
124 $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
125 $_ngcc_current_state = 0;
126 }
127 else {
128 unexpectedLeaveElement($__qname);
129 }
130 }
131 break;
132 case 0:
133 {
134 revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
135 }
136 break;
137 default:
138 {
139 unexpectedLeaveElement($__qname);
140 }
141 break;
142 }
143 }
145 public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
146 int $ai;
147 $uri = $__uri;
148 $localName = $__local;
149 $qname = $__qname;
150 switch($_ngcc_current_state) {
151 case 0:
152 {
153 revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
154 }
155 break;
156 default:
157 {
158 unexpectedEnterAttribute($__qname);
159 }
160 break;
161 }
162 }
164 public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
165 int $ai;
166 $uri = $__uri;
167 $localName = $__local;
168 $qname = $__qname;
169 switch($_ngcc_current_state) {
170 case 0:
171 {
172 revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
173 }
174 break;
175 default:
176 {
177 unexpectedLeaveAttribute($__qname);
178 }
179 break;
180 }
181 }
183 public void text(String $value) throws SAXException {
184 int $ai;
185 switch($_ngcc_current_state) {
186 case 0:
187 {
188 revertToParentFromText(makeResult(), super._cookie, $value);
189 }
190 break;
191 }
192 }
194 public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
195 switch($__cookie__) {
196 }
197 }
199 public boolean accepted() {
200 return(($_ngcc_current_state == 0));
201 }
204 private AnnotationParser parser;
205 private Locator locator;
207 public AnnotationImpl makeResult() {
208 Object e = null;
209 if(existing!=null) e=existing.getAnnotation();
211 return new AnnotationImpl( parser.getResult(e),locator);
212 }
214 }