Skip to content

Commit 965dd66

Browse files
committed
Improve Javadoc for RepeatableContainers
1 parent b71d95d commit 965dd66

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

spring-core/src/main/java/org/springframework/core/annotation/RepeatableContainers.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -39,6 +39,7 @@
3939
* <p>To completely disable repeatable support use {@link #none()}.
4040
*
4141
* @author Phillip Webb
42+
* @author Sam Brannen
4243
* @since 5.2
4344
*/
4445
public abstract class RepeatableContainers {
@@ -101,15 +102,19 @@ public static RepeatableContainers standardRepeatables() {
101102
}
102103

103104
/**
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,
108109
* this annotation must declare a {@code value} attribute returning an array
109110
* of repeatable annotations. If not specified, the container will be
110111
* deduced by inspecting the {@code @Repeatable} annotation on
111112
* {@code repeatable}.
112113
* @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
113118
*/
114119
public static RepeatableContainers of(
115120
Class<? extends Annotation> repeatable, @Nullable Class<? extends Annotation> container) {

0 commit comments

Comments
 (0)