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