本文整理了Java中org.apache.juneau.http.annotation.Body.examples()
方法的一些代码示例,展示了Body.examples()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Body.examples()
方法的具体详情如下:
包路径:org.apache.juneau.http.annotation.Body
类名称:Body
方法名:examples
暂无
代码示例来源: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()))
;
}
内容来源于网络,如有侵权,请联系作者删除!