Java Code Examples for javax.ws.rs.container.ResourceContext#getResource()

The following examples show how to use javax.ws.rs.container.ResourceContext#getResource() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SwaggerJsonBareService.java    From SciGraph with Apache License 2.0 5 votes vote down vote up
@GET
@Produces(MediaType.APPLICATION_JSON)
@Path("/swagger")
@ApiOperation(value = "The swagger definition in JSON", hidden = true)
public Response getListingJsonBare(
        @Context Application app,
        @Context ServletConfig sc,
        @Context HttpHeaders headers,
        @Context UriInfo uriInfo,
        @Context ResourceContext rc) {
    ApiListingResource apiListingResource = rc.getResource(ApiListingResource.class);
    return apiListingResource.getListingJson(app, sc, headers, uriInfo);
}
 
Example 2
Source File: TestClass5.java    From jaxrs-analyzer with Apache License 2.0 4 votes vote down vote up
public Object method() {
    ResourceContext rc = null;
    if ("".equals(""))
        return rc.getResource(AnotherSubResource.class);
    return rc.getResource(SubResource.class);
}
 
Example 3
Source File: TestClass1.java    From jaxrs-analyzer with Apache License 2.0 4 votes vote down vote up
public SubResource method() {
    ResourceContext rc = null;
    return rc.getResource(SubResource.class);
}
 
Example 4
Source File: TestClass3.java    From jaxrs-analyzer with Apache License 2.0 4 votes vote down vote up
public Object method() {
    ResourceContext rc = null;
    final Object resource = rc.getResource(SubResource.class);
    return resource;
}
 
Example 5
Source File: TestClass2.java    From jaxrs-analyzer with Apache License 2.0 4 votes vote down vote up
public Object method() {
    ResourceContext rc = null;
    return rc.getResource(SubResource.class);
}