|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2019 the original author or authors. |
| 2 | + * Copyright 2002-2022 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
39 | 39 | * <p>To completely disable repeatable support use {@link #none()}.
|
40 | 40 | *
|
41 | 41 | * @author Phillip Webb
|
| 42 | + * @author Sam Brannen |
42 | 43 | * @since 5.2
|
43 | 44 | */
|
44 | 45 | public abstract class RepeatableContainers {
|
@@ -101,15 +102,19 @@ public static RepeatableContainers standardRepeatables() {
|
101 | 102 | }
|
102 | 103 |
|
103 | 104 | /**
|
104 |
| - * Create a {@link RepeatableContainers} instance that uses a defined |
105 |
| - * container and repeatable type. |
106 |
| - * @param repeatable the contained repeatable annotation |
107 |
| - * @param container the container annotation or {@code null}. If specified, |
| 105 | + * Create a {@link RepeatableContainers} instance that uses predefined |
| 106 | + * repeatable and container types. |
| 107 | + * @param repeatable the contained repeatable annotation type |
| 108 | + * @param container the container annotation type or {@code null}. If specified, |
108 | 109 | * this annotation must declare a {@code value} attribute returning an array
|
109 | 110 | * of repeatable annotations. If not specified, the container will be
|
110 | 111 | * deduced by inspecting the {@code @Repeatable} annotation on
|
111 | 112 | * {@code repeatable}.
|
112 | 113 | * @return a {@link RepeatableContainers} instance
|
| 114 | + * @throws IllegalArgumentException if the supplied container type is |
| 115 | + * {@code null} and the annotation type is not a repeatable annotation |
| 116 | + * @throws AnnotationConfigurationException if the supplied container type |
| 117 | + * is not a properly configured container for a repeatable annotation |
113 | 118 | */
|
114 | 119 | public static RepeatableContainers of(
|
115 | 120 | Class<? extends Annotation> repeatable, @Nullable Class<? extends Annotation> container) {
|
|
0 commit comments