1
+ import java .io .InputStream ;
2
+ import java .io .IOException ;
3
+ import java .lang .annotation .Annotation ;
4
+ import java .lang .reflect .Type ;
5
+ import jakarta .ws .rs .GET ;
6
+ import jakarta .ws .rs .POST ;
7
+ import jakarta .ws .rs .DELETE ;
8
+ import jakarta .ws .rs .PUT ;
9
+ import jakarta .ws .rs .OPTIONS ;
10
+ import jakarta .ws .rs .HEAD ;
11
+ import jakarta .ws .rs .Path ;
12
+ import jakarta .ws .rs .BeanParam ;
13
+ import jakarta .ws .rs .CookieParam ;
14
+ import jakarta .ws .rs .FormParam ;
15
+ import jakarta .ws .rs .HeaderParam ;
16
+ import jakarta .ws .rs .MatrixParam ;
17
+ import jakarta .ws .rs .PathParam ;
18
+ import jakarta .ws .rs .Produces ;
19
+ import jakarta .ws .rs .QueryParam ;
20
+ import jakarta .ws .rs .client .Client ;
21
+ import jakarta .ws .rs .core .Context ;
22
+ import jakarta .ws .rs .core .MediaType ;
23
+ import jakarta .ws .rs .core .MultivaluedMap ;
24
+ import jakarta .ws .rs .core .Response ;
25
+ import jakarta .ws .rs .ext .MessageBodyReader ;
26
+
27
+ @ Path ("" )
28
+ public class JakartaRs1 { // $RootResourceClass
29
+ public JakartaRs1 () { // $InjectableConstructor
30
+ }
31
+
32
+ @ GET
33
+ int Get () { // $ResourceMethod $ResourceMethodOnResourceClass
34
+ return 0 ; // $XssSink
35
+ }
36
+
37
+ @ POST
38
+ void Post () { // $ResourceMethod $ResourceMethodOnResourceClass
39
+ }
40
+
41
+ @ Produces ("text/plain" ) // $ProducesAnnotation=text/plain
42
+ @ DELETE
43
+ double Delete () { // $ResourceMethod=text/plain $ResourceMethodOnResourceClass
44
+ return 0.0 ; // $XssSink
45
+ }
46
+
47
+ @ Produces (MediaType .TEXT_HTML ) // $ProducesAnnotation=text/html
48
+ @ PUT
49
+ void Put () { // $ResourceMethod=text/html $ResourceMethodOnResourceClass
50
+ }
51
+
52
+ @ OPTIONS
53
+ void Options () { // $ResourceMethod $ResourceMethodOnResourceClass
54
+ }
55
+
56
+ @ HEAD
57
+ void Head () { // $ResourceMethod $ResourceMethodOnResourceClass
58
+ }
59
+
60
+ @ Path ("" )
61
+ NonRootResourceClassJakarta subResourceLocator () { // $SubResourceLocator
62
+ return null ;
63
+ }
64
+
65
+ public class NonRootResourceClassJakarta { // $NonRootResourceClass
66
+ @ GET
67
+ int Get () { // $ResourceMethod $ResourceMethodOnResourceClass
68
+ return 0 ; // $XssSink
69
+ }
70
+
71
+ @ Produces ("text/html" ) // $ProducesAnnotation=text/html
72
+ @ POST
73
+ boolean Post () { // $ResourceMethod=text/html $ResourceMethodOnResourceClass
74
+ return false ;
75
+ }
76
+
77
+ @ Produces (MediaType .TEXT_PLAIN ) // $ProducesAnnotation=text/plain
78
+ @ DELETE
79
+ double Delete () { // $ResourceMethod=text/plain $ResourceMethodOnResourceClass
80
+ return 0.0 ; // $XssSink
81
+ }
82
+
83
+ @ Path ("" )
84
+ AnotherNonRootResourceClassJakarta subResourceLocator1 () { // $SubResourceLocator
85
+ return null ;
86
+ }
87
+
88
+ @ GET
89
+ @ Path ("" )
90
+ NotAResourceClass1Jakarta NotASubResourceLocator1 () { // $ResourceMethod $ResourceMethodOnResourceClass
91
+ return null ; // $XssSink
92
+ }
93
+
94
+ @ GET
95
+ NotAResourceClass2Jakarta NotASubResourceLocator2 () { // $ResourceMethod $ResourceMethodOnResourceClass
96
+ return null ; // $XssSink
97
+ }
98
+
99
+ NotAResourceClass2Jakarta NotASubResourceLocator3 () {
100
+ return null ;
101
+ }
102
+ }
103
+ }
104
+
105
+ class AnotherNonRootResourceClassJakarta { // $NonRootResourceClass
106
+ public AnotherNonRootResourceClassJakarta () {
107
+ }
108
+
109
+ public AnotherNonRootResourceClassJakarta (@ BeanParam int beanParam , @ CookieParam ("" ) int cookieParam , @ FormParam ("" ) int formParam , // $InjectionAnnotation
110
+ @ HeaderParam ("" ) int headerParam , @ MatrixParam ("" ) int matrixParam , @ PathParam ("" ) int pathParam , @ QueryParam ("" ) int queryParam , // $InjectionAnnotation
111
+ @ Context int context ) { // $InjectionAnnotation
112
+ }
113
+
114
+ @ Path ("" )
115
+ public void resourceMethodWithBeanParamParameter (@ BeanParam FooJakarta FooJakarta ) { // $SubResourceLocator $InjectionAnnotation
116
+ }
117
+ }
118
+
119
+ class FooJakarta {
120
+ FooJakarta () { // $BeanParamConstructor
121
+ }
122
+
123
+ public FooJakarta (@ BeanParam int beanParam , @ CookieParam ("" ) int cookieParam , @ FormParam ("" ) int formParam , // $InjectionAnnotation $BeanParamConstructor
124
+ @ HeaderParam ("" ) int headerParam , @ MatrixParam ("" ) int matrixParam , @ PathParam ("" ) int pathParam , @ QueryParam ("" ) int queryParam , // $InjectionAnnotation
125
+ @ Context int context ) { // $InjectionAnnotation
126
+ }
127
+
128
+ public FooJakarta (@ BeanParam int beanParam , @ CookieParam ("" ) int cookieParam , @ FormParam ("" ) int formParam , // $InjectionAnnotation
129
+ @ HeaderParam ("" ) int headerParam , @ MatrixParam ("" ) int matrixParam , @ PathParam ("" ) int pathParam , @ QueryParam ("" ) int queryParam , // $InjectionAnnotation
130
+ @ Context int context , int paramWithoutAnnotation ) { // $InjectionAnnotation
131
+ }
132
+ }
133
+
134
+ class NotAResourceClass1Jakarta {
135
+ }
136
+
137
+ class NotAResourceClass2Jakarta {
138
+ }
139
+
140
+ class ExtendsJakartaRs1 extends JakartaRs1 {
141
+ @ Override
142
+ int Get () { // $ResourceMethod
143
+ return 1 ;
144
+ }
145
+
146
+ @ Override
147
+ @ QueryParam ("" ) // $InjectionAnnotation
148
+ void Post () {
149
+ }
150
+
151
+ @ Override
152
+ double Delete () { // $ResourceMethod=text/plain
153
+ return 1.0 ;
154
+ }
155
+
156
+ @ Override
157
+ void Put () { // $ResourceMethod=text/html
158
+ }
159
+
160
+ @ Produces ("application/json" ) // $ProducesAnnotation=application/json
161
+ @ Override
162
+ void Options () {
163
+ }
164
+
165
+ @ Produces (MediaType .TEXT_XML ) // $ProducesAnnotation=text/xml
166
+ @ Override
167
+ void Head () {
168
+ }
169
+
170
+ }
171
+
172
+ @ Produces (MediaType .TEXT_XML ) // $ProducesAnnotation=text/xml
173
+ class ExtendsJakartaRs1WithProducesAnnotation extends JakartaRs1 {
174
+ @ Override
175
+ int Get () { // $ResourceMethod=text/xml
176
+ return 2 ;
177
+ }
178
+
179
+ @ Override
180
+ @ QueryParam ("" ) // $InjectionAnnotation
181
+ void Post () {
182
+ }
183
+
184
+ @ Override
185
+ double Delete () { // $ResourceMethod=text/plain
186
+ return 2.0 ;
187
+ }
188
+
189
+ @ Override
190
+ void Put () { // $ResourceMethod=text/html
191
+ }
192
+
193
+ @ Override
194
+ void Options () { // $ResourceMethod=text/xml
195
+ }
196
+ }
0 commit comments