private <T extends Annotation> Stream<Label> getLabels(final Description result, final Class<T> labelAnnotation,
final Function<T, Label> extractor) {
final List<Label> labels = getAnnotationsOnMethod(result, labelAnnotation).stream()
.map(extractor)
.collect(Collectors.toList());
if (labelAnnotation.isAnnotationPresent(Repeatable.class) || labels.isEmpty()) {
final Stream<Label> onClassLabels = getAnnotationsOnClass(result, labelAnnotation).stream()
.map(extractor);
labels.addAll(onClassLabels.collect(Collectors.toList()));
}
return labels.stream();
}
AllureJunit4.java 文件源码
java
阅读 32
收藏 0
点赞 0
评论 0
项目:allure-java
作者:
评论列表
文章目录