类 MergedAnnotationCollectors
java.lang.Object
cn.taketoday.core.annotation.MergedAnnotationCollectors
Collector implementations that provide various reduction operations for
MergedAnnotation instances.- 从以下版本开始:
- 4.0
- 作者:
- Phillip Webb, Sam Brannen
-
字段概要
字段修饰符和类型字段说明private static final Collector.Characteristics[]private static final Collector.Characteristics[] -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private static <K,V> MultiValueMap<K, V> combiner(MultiValueMap<K, V> map, MultiValueMap<K, V> additions) Combinerfor multi-value maps.private static <E,C extends Collection<E>>
Ccombiner(C collection, C additions) Combinerfor collections.private static booleanisSameInstance(Object instance, Object candidate) static <A extends Annotation>
Collector<MergedAnnotation<A>,?, Annotation[]> Create a newCollectorthat accumulates merged annotations to anAnnotationarray containing synthesized versions.static <R extends Annotation,A extends R>
Collector<MergedAnnotation<A>,?, R[]> toAnnotationArray(IntFunction<R[]> generator) Create a newCollectorthat accumulates merged annotations to anAnnotationarray containing synthesized versions.static <A extends Annotation>
Collector<MergedAnnotation<A>,?, Set<A>> Create a newCollectorthat accumulates merged annotations to aLinkedHashSetcontaining synthesized versions.static <A extends Annotation>
Collector<MergedAnnotation<A>,?, MultiValueMap<String, Object>> toMultiValueMap(MergedAnnotation.Adapt... adaptations) Create a newCollectorthat accumulates merged annotations to aMultiValueMapwith items added from each merged annotation as a map.static <A extends Annotation>
Collector<MergedAnnotation<A>,?, MultiValueMap<String, Object>> toMultiValueMap(UnaryOperator<MultiValueMap<String, Object>> finisher, MergedAnnotation.Adapt... adaptations) Create a newCollectorthat accumulates merged annotations to aMultiValueMapwith items added from each merged annotation as a map.
-
字段详细资料
-
NO_CHARACTERISTICS
-
IDENTITY_FINISH_CHARACTERISTICS
-
-
构造器详细资料
-
MergedAnnotationCollectors
public MergedAnnotationCollectors()
-
-
方法详细资料
-
toAnnotationSet
Create a newCollectorthat accumulates merged annotations to aLinkedHashSetcontaining 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. -
toAnnotationArray
public static <A extends Annotation> Collector<MergedAnnotation<A>,?, toAnnotationArray()Annotation[]> Create a newCollectorthat accumulates merged annotations to anAnnotationarray containing synthesized versions.- 类型参数:
A- the annotation type- 返回:
- a
Collectorwhich collects and synthesizes the annotations into anAnnotation[] - 另请参阅:
-
toAnnotationArray
public static <R extends Annotation,A extends R> Collector<MergedAnnotation<A>,?, toAnnotationArrayR[]> (IntFunction<R[]> generator) Create a newCollectorthat accumulates merged annotations to anAnnotationarray containing synthesized versions.- 类型参数:
A- the annotation typeR- the resulting array type- 参数:
generator- a function which produces a new array of the desired type and the provided length- 返回:
- a
Collectorwhich collects and synthesizes the annotations into an annotation array - 另请参阅:
-
toMultiValueMap
public static <A extends Annotation> Collector<MergedAnnotation<A>,?, toMultiValueMapMultiValueMap<String, Object>> (MergedAnnotation.Adapt... adaptations) Create a newCollectorthat accumulates merged annotations to aMultiValueMapwith items added from each merged annotation as a map.- 类型参数:
A- the annotation type- 参数:
adaptations- the adaptations that should be applied to the annotation values- 返回:
- a
Collectorwhich collects and synthesizes the annotations into aDefaultMultiValueMap - 另请参阅:
-
toMultiValueMap
public static <A extends Annotation> Collector<MergedAnnotation<A>,?, toMultiValueMapMultiValueMap<String, Object>> (UnaryOperator<MultiValueMap<String, Object>> finisher, MergedAnnotation.Adapt... adaptations) Create a newCollectorthat accumulates merged annotations to aMultiValueMapwith items added from each merged annotation as a map.- 类型参数:
A- the annotation type- 参数:
finisher- the finisher function for the newMultiValueMapadaptations- the adaptations that should be applied to the annotation values- 返回:
- a
Collectorwhich collects and synthesizes the annotations into aDefaultMultiValueMap - 另请参阅:
-
isSameInstance
-
combiner
-
combiner
private static <K,V> MultiValueMap<K,V> combiner(MultiValueMap<K, V> map, MultiValueMap<K, V> additions)
-