类 RepeatableContainers
- java.lang.Object
- org.springframework.core.annotation.RepeatableContainers
public abstract class RepeatableContainers extends Object
Strategy used to determine annotations that act as containers for other annotations. ThestandardRepeatables()
method provides a default strategy that respects Java's@Repeatable
support and should be suitable for most situations.The
of(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()
.- 从以下版本开始:
- 5.2
- 作者:
- Phillip Webb
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 RepeatableContainers
and(Class<? extends Annotation> container, Class<? extends Annotation> repeatable)
Add an additional explicit relationship between a contained and repeatable annotation.boolean
equals(Object other)
int
hashCode()
static RepeatableContainers
none()
Create aRepeatableContainers
instance that does not expand any repeatable annotations.static RepeatableContainers
of(Class<? extends Annotation> repeatable, Class<? extends Annotation> container)
Create aRepeatableContainers
instance that uses a defined container and repeatable type.static RepeatableContainers
standardRepeatables()
Create aRepeatableContainers
instance that searches using Java's@Repeatable
annotation.
方法详细资料
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
RepeatableContainers
instance
standardRepeatables
public static RepeatableContainers standardRepeatables()
Create aRepeatableContainers
instance that searches using Java's@Repeatable
annotation.- 返回:
- a
RepeatableContainers
instance
of
public static RepeatableContainers of(Class<? extends Annotation> repeatable, @Nullable Class<? extends Annotation> container)
Create aRepeatableContainers
instance that uses a defined container and repeatable type.- 参数:
repeatable
- the contained repeatable annotationcontainer
- the container annotation ornull
. If specified, this annotation must declare avalue
attribute returning an array of repeatable annotations. If not specified, the container will be deduced by inspecting the@Repeatable
annotation onrepeatable
.- 返回:
- a
RepeatableContainers
instance
none
public static RepeatableContainers none()
Create aRepeatableContainers
instance that does not expand any repeatable annotations.- 返回:
- a
RepeatableContainers
instance