• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java InjectParam类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.sun.jersey.api.core.InjectParam的典型用法代码示例。如果您正苦于以下问题:Java InjectParam类的具体用法?Java InjectParam怎么用?Java InjectParam使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



InjectParam类属于com.sun.jersey.api.core包,在下文中一共展示了InjectParam类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: extractParameters

import com.sun.jersey.api.core.InjectParam; //导入依赖的package包/类
@Override
public List<Parameter> extractParameters(List<Annotation> annotations, Type type, Set<Type> typesToSkip, Iterator<SwaggerExtension> chain) {
    Class<?> cls = TypeUtils.getRawType(type, type);

    List<Parameter> output = new ArrayList<Parameter>();
    if (shouldIgnoreClass(cls) || typesToSkip.contains(type)) {
        // stop the processing chain
        typesToSkip.add(type);
        return output;
    }
    for (Annotation annotation : annotations) {
        if (annotation instanceof BeanParam || annotation instanceof InjectParam) {
            return extractParameters(cls);
        }
    }
    if (chain.hasNext()) {
        return chain.next().extractParameters(annotations, type, typesToSkip, chain);
    }
    return Collections.emptyList();
}
 
开发者ID:kongchen,项目名称:swagger-maven-plugin,代码行数:21,代码来源:BeanParamInjectParamExtention.java


示例2: hasValidAnnotations

import com.sun.jersey.api.core.InjectParam; //导入依赖的package包/类
private boolean hasValidAnnotations(List<Annotation> parameterAnnotations) {
    // Because method parameters can contain parameters that are valid, but
    // not part of the API contract, first check to make sure the parameter
    // has at lease one annotation before processing it.  Also, check a
    // whitelist to make sure that the annotation of the parameter is
    // compatible with spring-maven-plugin

    List<Type> validParameterAnnotations = new ArrayList<Type>();
    validParameterAnnotations.add(ModelAttribute.class);
    validParameterAnnotations.add(BeanParam.class);
    validParameterAnnotations.add(InjectParam.class);
    validParameterAnnotations.add(ApiParam.class);
    validParameterAnnotations.add(PathParam.class);
    validParameterAnnotations.add(QueryParam.class);
    validParameterAnnotations.add(HeaderParam.class);
    validParameterAnnotations.add(FormParam.class);
    validParameterAnnotations.add(RequestParam.class);
    validParameterAnnotations.add(RequestBody.class);
    validParameterAnnotations.add(PathVariable.class);
    validParameterAnnotations.add(RequestHeader.class);
    validParameterAnnotations.add(RequestPart.class);
    validParameterAnnotations.add(CookieValue.class);


    boolean hasValidAnnotation = false;
    for (Annotation potentialAnnotation : parameterAnnotations) {
        if (validParameterAnnotations.contains(potentialAnnotation.annotationType())) {
            hasValidAnnotation = true;
            break;
        }
    }

    return hasValidAnnotation;
}
 
开发者ID:kongchen,项目名称:swagger-maven-plugin,代码行数:35,代码来源:AbstractReader.java


示例3: updatePetWithFormViaInjectParam

import com.sun.jersey.api.core.InjectParam; //导入依赖的package包/类
@POST
@Path("/{petId}/testInjectParam")
@Consumes({MediaType.APPLICATION_FORM_URLENCODED})
@ApiOperation(value = "Updates a pet in the store with form data",
        consumes = MediaType.APPLICATION_FORM_URLENCODED)
@ApiResponses(value = {
        @ApiResponse(code = 405, message = "Invalid input")})
public Response updatePetWithFormViaInjectParam(
        @InjectParam MyBean myBean) {
    System.out.println(myBean.getName());
    System.out.println(myBean.getStatus());
    return Response.ok().entity(new com.wordnik.sample.model.ApiResponse(200, "SUCCESS")).build();
}
 
开发者ID:kongchen,项目名称:swagger-maven-plugin,代码行数:14,代码来源:PetResource.java


示例4: AccessControlEditorServlet

import com.sun.jersey.api.core.InjectParam; //导入依赖的package包/类
@Inject
public AccessControlEditorServlet(@InjectParam GlobalDomainAccessStoreAdmin domainAccessStore,
                                  @InjectParam GlobalDomainAccessControllerProviderImpl domainAccessControllerProvider,
                                  @InjectParam GlobalDomainRoleControllerProviderImpl domainRoleControllerProvider,
                                  @InjectParam GlobalDomainAccessControlListEditorProviderImpl domainAccessControlListEditorProvider) {
    this.domainAccessStore = domainAccessStore;
    this.domainAccessControllerProvider = domainAccessControllerProvider;
    this.domainRoleControllerProvider = domainRoleControllerProvider;
    this.domainAccessControlListEditorProvider = domainAccessControlListEditorProvider;
}
 
开发者ID:bmwcarit,项目名称:joynr,代码行数:11,代码来源:AccessControlEditorServlet.java


示例5: DefaultContextResolver

import com.sun.jersey.api.core.InjectParam; //导入依赖的package包/类
public DefaultContextResolver(@InjectParam DefaultObjectMapper objectMapper) {
    om = objectMapper;
}
 
开发者ID:blacklocus,项目名称:jersey-jump,代码行数:4,代码来源:DefaultContextResolver.java



注:本文中的com.sun.jersey.api.core.InjectParam类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Ethernet类代码示例发布时间:2022-05-23
下一篇:
Java MockHttpServletResponse类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap