public abstract class MergedAnnotationCollectors
extends java.lang.Object
MergedAnnotation
instances.Modifier and Type | Field and Description |
---|---|
private static java.util.stream.Collector.Characteristics[] |
IDENTITY_FINISH_CHARACTERISTICS |
private static java.util.stream.Collector.Characteristics[] |
NO_CHARACTERISTICS |
Modifier | Constructor and Description |
---|---|
private |
MergedAnnotationCollectors() |
Modifier and Type | Method and Description |
---|---|
private static <E,L extends java.util.List<E>> |
addAll(L list,
L additions) |
private static boolean |
isSameInstance(java.lang.Object instance,
java.lang.Object candidate) |
private static <K,V> MultiValueMap<K,V> |
merge(MultiValueMap<K,V> map,
MultiValueMap<K,V> additions) |
static <A extends java.lang.annotation.Annotation> |
toAnnotationArray()
Create a new
Collector that accumulates merged annotations to an
Annotation array containing synthesized versions. |
static <R extends java.lang.annotation.Annotation,A extends R> |
toAnnotationArray(java.util.function.IntFunction<R[]> generator)
Create a new
Collector that accumulates merged annotations to an
Annotation array containing synthesized versions. |
static <A extends java.lang.annotation.Annotation> |
toAnnotationSet()
Create a new
Collector that accumulates merged annotations to a
LinkedHashSet containing synthesized versions. |
static <A extends java.lang.annotation.Annotation> |
toMultiValueMap(java.util.function.Function<MultiValueMap<java.lang.String,java.lang.Object>,MultiValueMap<java.lang.String,java.lang.Object>> finisher,
MergedAnnotation.Adapt... adaptations)
Create a new
Collector that accumulates merged annotations to an
MultiValueMap with items added from each merged annotation
as a map . |
static <A extends java.lang.annotation.Annotation> |
toMultiValueMap(MergedAnnotation.Adapt... adaptations)
Create a new
Collector that accumulates merged annotations to an
MultiValueMap with items added from each merged annotation
as a map . |
private static final java.util.stream.Collector.Characteristics[] NO_CHARACTERISTICS
private static final java.util.stream.Collector.Characteristics[] IDENTITY_FINISH_CHARACTERISTICS
public static <A extends java.lang.annotation.Annotation> java.util.stream.Collector<MergedAnnotation<A>,?,java.util.Set<A>> toAnnotationSet()
Collector
that accumulates merged annotations to a
LinkedHashSet
containing synthesized versions.A
- the annotation typeCollector
which collects and synthesizes the
annotations into a Set
public static <A extends java.lang.annotation.Annotation> java.util.stream.Collector<MergedAnnotation<A>,?,java.lang.annotation.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 java.lang.annotation.Annotation,A extends R> java.util.stream.Collector<MergedAnnotation<A>,?,R[]> toAnnotationArray(java.util.function.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 java.lang.annotation.Annotation> java.util.stream.Collector<MergedAnnotation<A>,?,MultiValueMap<java.lang.String,java.lang.Object>> toMultiValueMap(MergedAnnotation.Adapt... adaptations)
Collector
that accumulates merged annotations to an
MultiValueMap
with items added from each merged annotation
as a map
.A
- the annotation typeadaptations
- 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 java.lang.annotation.Annotation> java.util.stream.Collector<MergedAnnotation<A>,?,MultiValueMap<java.lang.String,java.lang.Object>> toMultiValueMap(java.util.function.Function<MultiValueMap<java.lang.String,java.lang.Object>,MultiValueMap<java.lang.String,java.lang.Object>> finisher, MergedAnnotation.Adapt... adaptations)
Collector
that accumulates merged annotations to an
MultiValueMap
with items added from each merged annotation
as a map
.A
- the annotation typeadaptations
- adaptations that should be applied to the annotation valuesfinisher
- the finisher function for the new MultiValueMap
Collector
which collects and synthesizes the
annotations into a LinkedMultiValueMap
toMultiValueMap(MergedAnnotation.Adapt...)
private static boolean isSameInstance(java.lang.Object instance, java.lang.Object candidate)
private static <E,L extends java.util.List<E>> L addAll(L list, L additions)
private static <K,V> MultiValueMap<K,V> merge(MultiValueMap<K,V> map, MultiValueMap<K,V> additions)