Package org.reflections.util
Class AnnotationMergeCollector
- java.lang.Object
-
- org.reflections.util.AnnotationMergeCollector
-
public class AnnotationMergeCollector extends Object implements Collector<Annotation,Map<String,Object>,Map<String,Object>>
merge annotations by mappingReflectionUtils.toMap(Annotation)
and reduce using the givenmergeFunction
mergeFunction
defaults toconcatValues(Object, Object)
.optional
annotatedElement
used byReflectionUtils.toMap(Annotation, AnnotatedElement)
get(Annotations.of(...)) .stream() .collect(new AnnotationMergeCollector())
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface java.util.stream.Collector
Collector.Characteristics
-
-
Constructor Summary
Constructors Constructor Description AnnotationMergeCollector()
AnnotationMergeCollector(AnnotatedElement annotatedElement)
AnnotationMergeCollector(AnnotatedElement annotatedElement, BiFunction<Object,Object,Object> mergeFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BiConsumer<Map<String,Object>,Annotation>
accumulator()
Set<Collector.Characteristics>
characteristics()
BinaryOperator<Map<String,Object>>
combiner()
Function<Map<String,Object>,Map<String,Object>>
finisher()
Supplier<Map<String,Object>>
supplier()
-
-
-
Constructor Detail
-
AnnotationMergeCollector
public AnnotationMergeCollector(AnnotatedElement annotatedElement, BiFunction<Object,Object,Object> mergeFunction)
-
AnnotationMergeCollector
public AnnotationMergeCollector()
-
AnnotationMergeCollector
public AnnotationMergeCollector(AnnotatedElement annotatedElement)
-
-
Method Detail
-
accumulator
public BiConsumer<Map<String,Object>,Annotation> accumulator()
- Specified by:
accumulator
in interfaceCollector<Annotation,Map<String,Object>,Map<String,Object>>
-
combiner
public BinaryOperator<Map<String,Object>> combiner()
-
characteristics
public Set<Collector.Characteristics> characteristics()
- Specified by:
characteristics
in interfaceCollector<Annotation,Map<String,Object>,Map<String,Object>>
-
-