/**
* Check whether the given <code>method</code> return type is annotated with the {@link PropertySetRef} annotation.
* @param method Method to inspect
* @return Optional {@link PropertySetRef} annotation, if available
*/
private static Optional<PropertySetRef> getResponsePropertySet(Method method) {
final AnnotatedType rt = method.getAnnotatedReturnType();
if (rt != null) {
if (rt.isAnnotationPresent(PropertySetRef.class)) {
return Optional.of(rt.getAnnotation(PropertySetRef.class));
}
// check meta-annotations
List<PropertySetRef> annotations = AnnotationUtils.getAnnotations(rt, PropertySetRef.class);
if (!annotations.isEmpty()) {
return Optional.ofNullable(annotations.get(0));
}
}
return Optional.empty();
}
PropertyBoxSwaggerExtension.java 文件源码
java
阅读 41
收藏 0
点赞 0
评论 0
项目:holon-jaxrs
作者:
评论列表
文章目录