当前位置: 首页>>代码示例>>Java>>正文


Java OhNoYouDidnt类代码示例

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


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

示例1: defer

import com.google.gag.annotation.remark.OhNoYouDidnt; //导入依赖的package包/类
@Hack
@OhNoYouDidnt
private static Optional<Plugin> defer(final ListableBeanFactory factory, final String typeName) {
    return Optional.of(typeName)
            .filter(DefaultPluginResolver::exists)
            .map(throwingFunction(DefaultPluginResolver::forName))
            .map(type -> defer(factory, type));
}
 
开发者ID:zalando-stups,项目名称:put-it-to-rest,代码行数:9,代码来源:DefaultPluginResolver.java

示例2: validRequestParam

import com.google.gag.annotation.remark.OhNoYouDidnt; //导入依赖的package包/类
@RequestMapping(path = "/handler-invalid-param", method = POST)
public void validRequestParam(@RequestBody final UserRequest user) {
    @Hack("I couldn't make Spring throw this implicitly using annotations...")
    @Facepalm
    @OhNoYouDidnt
    final Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
    final Set<ConstraintViolation<UserRequest>> violations = validator.validate(user);
    throw new ConstraintViolationException(violations);
}
 
开发者ID:zalando,项目名称:problem-spring-web,代码行数:10,代码来源:ExampleRestController.java

示例3: set

import com.google.gag.annotation.remark.OhNoYouDidnt; //导入依赖的package包/类
/**
 * This is required to workaround missing support for {@link com.fasterxml.jackson.annotation.JsonAnySetter} on
 * constructors annotated with {@link com.fasterxml.jackson.annotation.JsonCreator}.
 *
 * @param key   the custom key
 * @param value the custom value
 * @see <a href="https://github.com/FasterXML/jackson-databind/issues/562">Jackson Issue 562</a>
 */
@Hack
@OhNoYouDidnt
void set(final String key, final Object value) {
    parameters.put(key, value);
}
 
开发者ID:zalando,项目名称:problem,代码行数:14,代码来源:AbstractThrowableProblem.java


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