类 MergedAnnotationsCollection
java.lang.Object
cn.taketoday.core.annotation.MergedAnnotationsCollection
- 所有已实现的接口:
MergedAnnotations,Iterable<MergedAnnotation<Annotation>>
MergedAnnotations implementation backed by a Collection of
MergedAnnotation instances that represent direct annotations.- 从以下版本开始:
- 4.0
- 作者:
- Phillip Webb, Harry Yang
- 另请参阅:
-
嵌套类概要
嵌套类从接口继承的嵌套类/接口 cn.taketoday.core.annotation.MergedAnnotations
MergedAnnotations.Search, MergedAnnotations.SearchStrategy -
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private <A extends Annotation>
MergedAnnotation<A>find(Object requiredType, Predicate<? super MergedAnnotation<A>> predicate, MergedAnnotationSelector<A> selector) <A extends Annotation>
MergedAnnotation<A>Get the nearest matching annotation or meta-annotation of the specified type, orMergedAnnotation.missing()if none is present.<A extends Annotation>
MergedAnnotation<A>get(Class<A> annotationType, Predicate<? super MergedAnnotation<A>> predicate) Get the nearest matching annotation or meta-annotation of the specified type, orMergedAnnotation.missing()if none is present.<A extends Annotation>
MergedAnnotation<A>get(Class<A> annotationType, Predicate<? super MergedAnnotation<A>> predicate, MergedAnnotationSelector<A> selector) Get a matching annotation or meta-annotation of the specified type, orMergedAnnotation.missing()if none is present.<A extends Annotation>
MergedAnnotation<A>Get the nearest matching annotation or meta-annotation of the specified type, orMergedAnnotation.missing()if none is present.<A extends Annotation>
MergedAnnotation<A>get(String annotationType, Predicate<? super MergedAnnotation<A>> predicate) Get the nearest matching annotation or meta-annotation of the specified type, orMergedAnnotation.missing()if none is present.<A extends Annotation>
MergedAnnotation<A>get(String annotationType, Predicate<? super MergedAnnotation<A>> predicate, MergedAnnotationSelector<A> selector) Get a matching annotation or meta-annotation of the specified type, orMergedAnnotation.missing()if none is present.<A extends Annotation>
AnnotationAttributes[]getAttributes(Class<A> annotationType) <A extends Annotation>
booleanisDirectlyPresent(Class<A> annotationType) Determine if the specified annotation is directly present.booleanisDirectlyPresent(String annotationType) Determine if the specified annotation is directly present.private static booleanisMappingForType(AnnotationTypeMapping mapping, Object requiredType) <A extends Annotation>
booleanDetermine if the specified annotation is either directly present or meta-present.private booleanbooleanDetermine if the specified annotation is either directly present or meta-present.iterator()private <A extends Annotation>
Spliterator<MergedAnnotation<A>>spliterator(Object annotationType) stream()Stream all annotations and meta-annotations contained in this collection.<A extends Annotation>
Stream<MergedAnnotation<A>>Stream all annotations and meta-annotations that match the specified type.<A extends Annotation>
Stream<MergedAnnotation<A>>Stream all annotations and meta-annotations that match the specified type.(专用程序包) static MergedAnnotationsvalueOf(Collection<MergedAnnotation<?>> annotations) Create a newMergedAnnotationsinstance from the specified collection of directly present annotations.
-
字段详细资料
-
annotations
-
mappings
-
-
构造器详细资料
-
MergedAnnotationsCollection
-
-
方法详细资料
-
iterator
- 指定者:
iterator在接口中Iterable<MergedAnnotation<Annotation>>
-
spliterator
- 指定者:
spliterator在接口中Iterable<MergedAnnotation<Annotation>>
-
spliterator
private <A extends Annotation> Spliterator<MergedAnnotation<A>> spliterator(@Nullable Object annotationType) -
isPresent
从接口复制的说明:MergedAnnotationsDetermine if the specified annotation is either directly present or meta-present.Equivalent to calling
get(annotationType).isPresent().- 指定者:
isPresent在接口中MergedAnnotations- 参数:
annotationType- the annotation type to check- 返回:
trueif the annotation is present
-
isPresent
从接口复制的说明:MergedAnnotationsDetermine if the specified annotation is either directly present or meta-present.Equivalent to calling
get(annotationType).isPresent().- 指定者:
isPresent在接口中MergedAnnotations- 参数:
annotationType- the fully qualified class name of the annotation type to check- 返回:
trueif the annotation is present
-
isDirectlyPresent
从接口复制的说明:MergedAnnotationsDetermine if the specified annotation is directly present.Equivalent to calling
get(annotationType).isDirectlyPresent().- 指定者:
isDirectlyPresent在接口中MergedAnnotations- 参数:
annotationType- the annotation type to check- 返回:
trueif the annotation is directly present
-
isDirectlyPresent
从接口复制的说明:MergedAnnotationsDetermine if the specified annotation is directly present.Equivalent to calling
get(annotationType).isDirectlyPresent().- 指定者:
isDirectlyPresent在接口中MergedAnnotations- 参数:
annotationType- the fully qualified class name of the annotation type to check- 返回:
trueif the annotation is directly present
-
isPresent
-
get
从接口复制的说明:MergedAnnotationsGet the nearest matching annotation or meta-annotation of the specified type, orMergedAnnotation.missing()if none is present.- 指定者:
get在接口中MergedAnnotations- 参数:
annotationType- the annotation type to get- 返回:
- a
MergedAnnotationinstance
-
get
public <A extends Annotation> MergedAnnotation<A> get(Class<A> annotationType, @Nullable Predicate<? super MergedAnnotation<A>> predicate) 从接口复制的说明:MergedAnnotationsGet the nearest matching annotation or meta-annotation of the specified type, orMergedAnnotation.missing()if none is present.- 指定者:
get在接口中MergedAnnotations- 参数:
annotationType- the annotation type to getpredicate- a predicate that must match, ornullif only type matching is required- 返回:
- a
MergedAnnotationinstance - 另请参阅:
-
get
public <A extends Annotation> MergedAnnotation<A> get(Class<A> annotationType, @Nullable Predicate<? super MergedAnnotation<A>> predicate, @Nullable MergedAnnotationSelector<A> selector) 从接口复制的说明:MergedAnnotationsGet a matching annotation or meta-annotation of the specified type, orMergedAnnotation.missing()if none is present.- 指定者:
get在接口中MergedAnnotations- 参数:
annotationType- the annotation type to getpredicate- a predicate that must match, ornullif only type matching is requiredselector- a selector used to choose the most appropriate annotation within an aggregate, ornullto select the nearest- 返回:
- a
MergedAnnotationinstance - 另请参阅:
-
get
从接口复制的说明:MergedAnnotationsGet the nearest matching annotation or meta-annotation of the specified type, orMergedAnnotation.missing()if none is present.- 指定者:
get在接口中MergedAnnotations- 参数:
annotationType- the fully qualified class name of the annotation type to get- 返回:
- a
MergedAnnotationinstance
-
get
public <A extends Annotation> MergedAnnotation<A> get(String annotationType, @Nullable Predicate<? super MergedAnnotation<A>> predicate) 从接口复制的说明:MergedAnnotationsGet the nearest matching annotation or meta-annotation of the specified type, orMergedAnnotation.missing()if none is present.- 指定者:
get在接口中MergedAnnotations- 参数:
annotationType- the fully qualified class name of the annotation type to getpredicate- a predicate that must match, ornullif only type matching is required- 返回:
- a
MergedAnnotationinstance - 另请参阅:
-
get
public <A extends Annotation> MergedAnnotation<A> get(String annotationType, @Nullable Predicate<? super MergedAnnotation<A>> predicate, @Nullable MergedAnnotationSelector<A> selector) 从接口复制的说明:MergedAnnotationsGet a matching annotation or meta-annotation of the specified type, orMergedAnnotation.missing()if none is present.- 指定者:
get在接口中MergedAnnotations- 参数:
annotationType- the fully qualified class name of the annotation type to getpredicate- a predicate that must match, ornullif only type matching is requiredselector- a selector used to choose the most appropriate annotation within an aggregate, ornullto select the nearest- 返回:
- a
MergedAnnotationinstance - 另请参阅:
-
find
@Nullable private <A extends Annotation> MergedAnnotation<A> find(Object requiredType, @Nullable Predicate<? super MergedAnnotation<A>> predicate, @Nullable MergedAnnotationSelector<A> selector) -
stream
从接口复制的说明:MergedAnnotationsStream all annotations and meta-annotations that match the specified type. The resulting stream follows the same ordering rules asMergedAnnotations.stream().- 指定者:
stream在接口中MergedAnnotations- 参数:
annotationType- the annotation type to match- 返回:
- a stream of matching annotations
-
stream
从接口复制的说明:MergedAnnotationsStream all annotations and meta-annotations that match the specified type. The resulting stream follows the same ordering rules asMergedAnnotations.stream().- 指定者:
stream在接口中MergedAnnotations- 参数:
annotationType- the fully qualified class name of the annotation type to match- 返回:
- a stream of matching annotations
-
stream
从接口复制的说明:MergedAnnotationsStream all annotations and meta-annotations contained in this collection. The resulting stream is ordered first by the aggregate index and then by the annotation distance (with the closest annotations first). This ordering means that, for most use-cases, the most suitable annotations appear earliest in the stream.- 指定者:
stream在接口中MergedAnnotations- 返回:
- a stream of annotations
-
getAttributes
- 指定者:
getAttributes在接口中MergedAnnotations
-
isMappingForType
private static boolean isMappingForType(AnnotationTypeMapping mapping, @Nullable Object requiredType) -
valueOf
从接口复制的说明:MergedAnnotationsCreate a newMergedAnnotationsinstance from the specified collection of directly present annotations. This method allows aMergedAnnotationsinstance to be created from annotations that are not necessarily loaded using reflection. The provided annotations must all bedirectly presentand must have anaggregate indexof0.The resulting
MergedAnnotationsinstance will contain both the specified annotations, and any meta-annotations that can be read using reflection.- 参数:
annotations- the annotations to include- 返回:
- a
MergedAnnotationsinstance containing the annotations - 另请参阅:
-