public abstract class MergedAnnotationCollectors extends Object
Collector
implementations that provide various reduction operations for
MergedAnnotation
instances.Modifier and Type | Method and Description |
---|---|
static <A extends Annotation> |
toAnnotationArray()
Create a new
Collector that accumulates merged annotations to an
Annotation array containing synthesized versions. |
static <R extends Annotation,A extends R> |
toAnnotationArray(IntFunction<R[]> generator)
Create a new
Collector that accumulates merged annotations to an
Annotation array containing synthesized versions. |
static <A extends Annotation> |
toAnnotationSet()
Create a new
Collector that accumulates merged annotations to a
LinkedHashSet containing synthesized versions. |
static <A extends Annotation> |
toMultiValueMap(Function<MultiValueMap<String,Object>,MultiValueMap<String,Object>> finisher,
MergedAnnotation.Adapt... adaptations)
Create a new
Collector that accumulates merged annotations to a
MultiValueMap with items added from each merged annotation
as a map. |
static <A extends Annotation> |
toMultiValueMap(MergedAnnotation.Adapt... adaptations)
Create a new
Collector that accumulates merged annotations to a
MultiValueMap with items added from each merged annotation
as a map. |
public static <A extends Annotation> Collector<MergedAnnotation<A>,?,Set<A>> toAnnotationSet()
Collector
that accumulates merged annotations to a
LinkedHashSet
containing synthesized versions.
The collector returned by this method is effectively equivalent to
Collectors.mapping(MergedAnnotation::synthesize, Collectors.toCollection(LinkedHashSet::new))
but avoids the creation of a composite collector.
public static <A extends Annotation> Collector<MergedAnnotation<A>,?,Annotation[]> toAnnotationArray()
Collector
that accumulates merged annotations to an
Annotation
array containing synthesized versions.A
- the annotation typeCollector
which collects and synthesizes the
annotations into an Annotation[]
toAnnotationArray(IntFunction)
public static <R extends Annotation,A extends R> Collector<MergedAnnotation<A>,?,R[]> toAnnotationArray(IntFunction<R[]> generator)
Collector
that accumulates merged annotations to an
Annotation
array containing synthesized versions.A
- the annotation typeR
- the resulting array typegenerator
- a function which produces a new array of the desired
type and the provided lengthCollector
which collects and synthesizes the
annotations into an annotation arraytoAnnotationArray()
public static <A extends Annotation> Collector<MergedAnnotation<A>,?,MultiValueMap<String,Object>> toMultiValueMap(MergedAnnotation.Adapt... adaptations)
Collector
that accumulates merged annotations to a
MultiValueMap
with items added from each merged annotation
as a map.A
- the annotation typeadaptations
- the adaptations that should be applied to the annotation valuesCollector
which collects and synthesizes the
annotations into a LinkedMultiValueMap
toMultiValueMap(Function, MergedAnnotation.Adapt...)
public static <A extends Annotation> Collector<MergedAnnotation<A>,?,MultiValueMap<String,Object>> toMultiValueMap(Function<MultiValueMap<String,Object>,MultiValueMap<String,Object>> finisher, MergedAnnotation.Adapt... adaptations)
Collector
that accumulates merged annotations to a
MultiValueMap
with items added from each merged annotation
as a map.A
- the annotation typefinisher
- the finisher function for the new MultiValueMap
adaptations
- the adaptations that should be applied to the annotation valuesCollector
which collects and synthesizes the
annotations into a LinkedMultiValueMap
toMultiValueMap(MergedAnnotation.Adapt...)