public abstract class RepeatableContainers extends Object
standardRepeatables() 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().
| Modifier and Type | Method and Description |
|---|---|
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 a
RepeatableContainers instance that does not expand any
repeatable annotations. |
static RepeatableContainers |
of(Class<? extends Annotation> repeatable,
Class<? extends Annotation> container)
Create a
RepeatableContainers instance that uses a defined
container and repeatable type. |
static RepeatableContainers |
standardRepeatables()
Create a
RepeatableContainers instance that searches using Java's
@Repeatable annotation. |
public RepeatableContainers and(Class<? extends Annotation> container, Class<? extends Annotation> repeatable)
container - the container typerepeatable - the contained repeatable typeRepeatableContainers instancepublic static RepeatableContainers standardRepeatables()
RepeatableContainers instance that searches using Java's
@Repeatable annotation.RepeatableContainers instancepublic static RepeatableContainers of(Class<? extends Annotation> repeatable, @Nullable Class<? extends Annotation> container)
RepeatableContainers instance that uses a defined
container and repeatable type.repeatable - the contained repeatable annotationcontainer - the container annotation or null. If specified,
this annotation must declare a value attribute returning an array
of repeatable annotations. If not specified, the container will be
deduced by inspecting the @Repeatable annotation on
repeatable.RepeatableContainers instancepublic static RepeatableContainers none()
RepeatableContainers instance that does not expand any
repeatable annotations.RepeatableContainers instance