org.apache.juneau.http.annotation.Body.value()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(167)

本文整理了Java中org.apache.juneau.http.annotation.Body.value()方法的一些代码示例,展示了Body.value()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Body.value()方法的具体详情如下:
包路径:org.apache.juneau.http.annotation.Body
类名称:Body
方法名:value

Body.value介绍

暂无

代码示例

代码示例来源:origin: apache/juneau

/**
 * Returns <jk>true</jk> if the specified annotation contains all default values.
 *
 * @param a The annotation to check.
 * @return <jk>true</jk> if the specified annotation contains all default values.
 */
public static boolean empty(Body a) {
  if (a == null)
    return true;
  return
    allEmpty(a.description(), a.example(), a.examples(), a.api(), a.value())
    && allFalse(a.required())
    && empty(a.schema());
}

代码示例来源:origin: org.apache.juneau/juneau-marshall

/**
 * Returns <jk>true</jk> if the specified annotation contains all default values.
 *
 * @param a The annotation to check.
 * @return <jk>true</jk> if the specified annotation contains all default values.
 */
public static boolean empty(Body a) {
  if (a == null)
    return true;
  return
    allEmpty(a.description(), a.example(), a.examples(), a.api(), a.value())
    && allFalse(a.required())
    && empty(a.schema());
}

代码示例来源:origin: apache/juneau

/**
 * Returns <jk>true</jk> if the specified annotation contains all default values.
 *
 * @param a The annotation to check.
 * @return <jk>true</jk> if the specified annotation contains all default values.
 */
public static boolean empty(Body a) {
  if (a == null)
    return true;
  return
    allEmpty(a.description(), a.example(), a.examples(), a.api(), a.value())
    && allFalse(a.required())
    && empty(a.schema());
}

代码示例来源:origin: apache/juneau

private ObjectMap merge(ObjectMap om, Body a) throws ParseException {
  if (empty(a))
    return om;
  om = newMap(om);
  if (a.value().length > 0)
    om.putAll(parseMap(a.value()));
  if (a.api().length > 0)
    om.putAll(parseMap(a.api()));
  return om
    .appendSkipEmpty("description", resolve(a.description()))
    .appendSkipEmpty("x-example", resolve(a.example()))
    .appendSkipEmpty("x-examples", parseMap(a.examples()))
    .appendSkipFalse("required", a.required())
    .appendSkipEmpty("schema", merge(om.getObjectMap("schema"), a.schema()))
  ;
}

代码示例来源:origin: apache/juneau

private ObjectMap merge(ObjectMap om, Body a) throws ParseException {
  if (empty(a))
    return om;
  om = newMap(om);
  if (a.value().length > 0)
    om.putAll(parseMap(a.value()));
  if (a.api().length > 0)
    om.putAll(parseMap(a.api()));
  return om
    .appendSkipEmpty("description", resolve(a.description()))
    .appendSkipEmpty("x-example", resolve(a.example()))
    .appendSkipEmpty("x-examples", parseMap(a.examples()))
    .appendSkipFalse("required", a.required())
    .appendSkipEmpty("schema", merge(om.getObjectMap("schema"), a.schema()))
  ;
}

代码示例来源:origin: org.apache.juneau/juneau-rest-server

private ObjectMap merge(ObjectMap om, Body a) throws ParseException {
  if (empty(a))
    return om;
  om = newMap(om);
  if (a.value().length > 0)
    om.putAll(parseMap(a.value()));
  if (a.api().length > 0)
    om.putAll(parseMap(a.api()));
  return om
    .appendSkipEmpty("description", resolve(a.description()))
    .appendSkipEmpty("x-example", resolve(a.example()))
    .appendSkipEmpty("x-examples", parseMap(a.examples()))
    .appendSkipFalse("required", a.required())
    .appendSkipEmpty("schema", merge(om.getObjectMap("schema"), a.schema()))
  ;
}

相关文章