类 RepeatableContainers
java.lang.Object
cn.taketoday.core.annotation.RepeatableContainers
- 直接已知子类:
RepeatableContainers.ExplicitRepeatableContainer,RepeatableContainers.StandardRepeatableContainers
Strategy used to determine annotations that act as containers for other
annotations. The
standard() method provides a default
strategy that respects Java's @Repeatable support and
should be suitable for most situations.
The valueOf(java.lang.Class<? extends java.lang.annotation.Annotation>, java.lang.Class<? extends java.lang.annotation.Annotation>) method can be used to register relationships for
annotations that do not wish to use @Repeatable.
To completely disable repeatable support use none().
- 从以下版本开始:
- 4.0
- 作者:
- Phillip Webb, Sam Brannen, Harry Yang
-
嵌套类概要
嵌套类修饰符和类型类说明private static classA single explicit mapping.private static classStandardRepeatableContainersimplementation that searches using Java's@Repeatableannotation. -
字段概要
字段修饰符和类型字段说明(专用程序包) static final ConcurrentReferenceHashMap<Class<? extends Annotation>,Object> static final RepeatableContainersNo repeatable containers.private final RepeatableContainers -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明and(Class<? extends Annotation> container, Class<? extends Annotation> repeatable) Add an additional explicit relationship between a container and repeatable annotation.boolean(专用程序包) Annotation[]findRepeatedAnnotations(Annotation annotation) inthashCode()private static ObjectinvokeAnnotationMethod(Annotation annotation, Method method) static RepeatableContainersnone()Create aRepeatableContainersinstance that does not expand any repeatable annotations.static RepeatableContainersstandard()Create aRepeatableContainersinstance that searches using Java's@Repeatableannotation.static RepeatableContainersvalueOf(Class<? extends Annotation> repeatable, Class<? extends Annotation> container) Create aRepeatableContainersinstance that uses predefined repeatable and container types.
-
字段详细资料
-
cache
-
NONE
No repeatable containers. -
parent
-
-
构造器详细资料
-
RepeatableContainers
-
-
方法详细资料
-
and
public RepeatableContainers and(Class<? extends Annotation> container, Class<? extends Annotation> repeatable) Add an additional explicit relationship between a container and repeatable annotation.WARNING: the arguments supplied to this method are in the reverse order of those supplied to
valueOf(Class, Class)- 参数:
container- the container annotation typerepeatable- the repeatable annotation type- 返回:
- a new
RepeatableContainersinstance
-
findRepeatedAnnotations
-
equals
-
hashCode
public int hashCode() -
none
Create aRepeatableContainersinstance that does not expand any repeatable annotations.- 返回:
- a
RepeatableContainersinstance
-
standard
Create aRepeatableContainersinstance that searches using Java's@Repeatableannotation.- 返回:
- a
RepeatableContainersinstance
-
valueOf
public static RepeatableContainers valueOf(Class<? extends Annotation> repeatable, @Nullable Class<? extends Annotation> container) Create aRepeatableContainersinstance that uses predefined repeatable and container types.- 参数:
repeatable- the contained repeatable annotation typecontainer- the container annotation type ornull. If specified, this annotation must declare avalueattribute returning an array of repeatable annotations. If not specified, the container will be deduced by inspecting the@Repeatableannotation onrepeatable.- 返回:
- a
RepeatableContainersinstance - 抛出:
IllegalArgumentException- if the supplied container type isnulland the annotation type is not a repeatable annotationAnnotationConfigurationException- if the supplied container type is not a properly configured container for a repeatable annotation
-
invokeAnnotationMethod
-