类 RepeatableContainers
java.lang.Object
cn.taketoday.core.annotation.RepeatableContainers
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, TODAY
-
方法概要
修饰符和类型方法说明and(Class<? extends Annotation> container, Class<? extends Annotation> repeatable) Add an additional explicit relationship between a contained and repeatable annotation.booleaninthashCode()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 a defined container and repeatable type.
-
方法详细资料
-
and
public RepeatableContainers and(Class<? extends Annotation> container, Class<? extends Annotation> repeatable) Add an additional explicit relationship between a contained and repeatable annotation.- 参数:
container- the container typerepeatable- the contained repeatable type- 返回:
- a new
RepeatableContainersinstance
-
equals
-
hashCode
public int hashCode() -
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 a defined container and repeatable type.- 参数:
repeatable- the contained repeatable annotationcontainer- the container annotation 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
-
none
Create aRepeatableContainersinstance that does not expand any repeatable annotations.- 返回:
- a
RepeatableContainersinstance
-