-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathJaxRs2.java
More file actions
99 lines (90 loc) · 3.61 KB
/
JaxRs2.java
File metadata and controls
99 lines (90 loc) · 3.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import java.io.InputStream;
import java.io.IOException;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.DELETE;
import javax.ws.rs.PUT;
import javax.ws.rs.OPTIONS;
import javax.ws.rs.HEAD;
import javax.ws.rs.Path;
import javax.ws.rs.BeanParam;
import javax.ws.rs.Consumes;
import javax.ws.rs.CookieParam;
import javax.ws.rs.FormParam;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.MatrixParam;
import javax.ws.rs.PathParam;
import javax.ws.rs.QueryParam;
import javax.ws.rs.client.Client;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;
import javax.ws.rs.ext.MessageBodyReader;
@Path("")
class JaxRs2 { // $ RootResourceClass
JaxRs2() {
}
public JaxRs2(// $ InjectableConstructor
@BeanParam int beanParam, // $ InjectionAnnotation
@CookieParam("") int cookieParam, // $ InjectionAnnotation
@FormParam("") int formParam, // $ InjectionAnnotation
@HeaderParam("") int headerParam, // $ InjectionAnnotation
@MatrixParam("") int matrixParam, // $ InjectionAnnotation
@PathParam("") int pathParam, // $ InjectionAnnotation
@QueryParam("") int queryParam, // $ InjectionAnnotation
@Context int context) { // $ InjectionAnnotation
}
public JaxRs2(
@BeanParam int beanParam, // $ InjectionAnnotation
@CookieParam("") int cookieParam, // $ InjectionAnnotation
@FormParam("") int formParam, // $ InjectionAnnotation
@HeaderParam("") int headerParam, // $ InjectionAnnotation
@MatrixParam("") int matrixParam, // $ InjectionAnnotation
@PathParam("") int pathParam, // $ InjectionAnnotation
@QueryParam("") int queryParam, // $ InjectionAnnotation
@Context int context, // $ InjectionAnnotation
int paramWithoutAnnotation) {
}
@BeanParam // $ InjectionAnnotation
int beanField; // $ InjectableField
@CookieParam("") // $ InjectionAnnotation
int cookieField; // $ InjectableField
@FormParam("") // $ InjectionAnnotation
int formField; // $ InjectableField
@HeaderParam("") // $ InjectionAnnotation
int headerField; // $ InjectableField
@MatrixParam("") // $ InjectionAnnotation
int matrixField; // $ InjectableField
@PathParam("") // $ InjectionAnnotation
int pathField; // $ InjectableField
@QueryParam("") // $ InjectionAnnotation
int queryField; // $ InjectableField
@Context // $ InjectionAnnotation
int context; // $ InjectableField
int fieldWithoutAnnotation;
}
class CustomUnmarshaller implements MessageBodyReader {
@Override
public boolean isReadable(Class aClass, Type type, Annotation[] annotations, MediaType mediaType) {
return true;
}
@Override
public Object readFrom(Class aClass, Type type, Annotation[] annotations, MediaType mediaType, MultivaluedMap multivaluedMap, InputStream inputStream) {
return null;
}
}
class Miscellaneous {
@Consumes("") // $ ConsumesAnnotation
public static void miscellaneous() throws IOException {
Response.ResponseBuilder responseBuilder = Response.accepted(); // $ ResponseBuilderDeclaration
Response response = responseBuilder.build(); // $ ResponseDeclaration
Client client; // $ ClientDeclaration
MessageBodyReader<String> messageBodyReader = null; // $ MessageBodyReaderDeclaration
messageBodyReader.readFrom(null, null, null, null, null, null); // $ MessageBodyReaderReadFromCall MessageBodyReaderReadCall
CustomUnmarshaller customUnmarshaller = null;
customUnmarshaller.readFrom(null, null, null, null, null, null); // $ MessageBodyReaderReadCall
}
}