Skip to content

Commit ea5c6c2

Browse files
committed
Polish BootstrapRegistry's javadoc
See gh-23326
1 parent 986a9a4 commit ea5c6c2

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BootstrapRegistry.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
import java.util.function.Supplier;
2020

21-
import io.undertow.servlet.api.InstanceFactory;
22-
2321
import org.springframework.context.ApplicationContext;
2422
import org.springframework.context.ApplicationListener;
2523
import org.springframework.core.env.Environment;
@@ -73,7 +71,7 @@ public interface BootstrapRegistry {
7371
<T> boolean isRegistered(Class<T> type);
7472

7573
/**
76-
* Return any existing {@link InstanceFactory} for the given type.
74+
* Return any existing {@link InstanceSupplier} for the given type.
7775
* @param <T> the instance type
7876
* @param type the instance type
7977
* @return the registered {@link InstanceSupplier} or {@code null}
@@ -104,22 +102,22 @@ public interface InstanceSupplier<T> {
104102
T get(BootstrapContext context);
105103

106104
/**
107-
* Factory method that can be used to create a {@link InstanceFactory} for a given
108-
* instance.
105+
* Factory method that can be used to create a {@link InstanceSupplier} for a
106+
* given instance.
109107
* @param <T> the instance type
110108
* @param instance the instance
111-
* @return a new {@link InstanceFactory}
109+
* @return a new {@link InstanceSupplier}
112110
*/
113111
static <T> InstanceSupplier<T> of(T instance) {
114112
return (registry) -> instance;
115113
}
116114

117115
/**
118-
* Factory method that can be used to create a {@link InstanceFactory} from a
116+
* Factory method that can be used to create a {@link InstanceSupplier} from a
119117
* {@link Supplier}.
120118
* @param <T> the instance type
121119
* @param supplier the supplier that will provide the instance
122-
* @return a new {@link InstanceFactory}
120+
* @return a new {@link InstanceSupplier}
123121
*/
124122
static <T> InstanceSupplier<T> from(Supplier<T> supplier) {
125123
return (registry) -> (supplier != null) ? supplier.get() : null;

0 commit comments

Comments
 (0)