|
18 | 18 |
|
19 | 19 | import java.util.function.Supplier;
|
20 | 20 |
|
21 |
| -import io.undertow.servlet.api.InstanceFactory; |
22 |
| - |
23 | 21 | import org.springframework.context.ApplicationContext;
|
24 | 22 | import org.springframework.context.ApplicationListener;
|
25 | 23 | import org.springframework.core.env.Environment;
|
@@ -73,7 +71,7 @@ public interface BootstrapRegistry {
|
73 | 71 | <T> boolean isRegistered(Class<T> type);
|
74 | 72 |
|
75 | 73 | /**
|
76 |
| - * Return any existing {@link InstanceFactory} for the given type. |
| 74 | + * Return any existing {@link InstanceSupplier} for the given type. |
77 | 75 | * @param <T> the instance type
|
78 | 76 | * @param type the instance type
|
79 | 77 | * @return the registered {@link InstanceSupplier} or {@code null}
|
@@ -104,22 +102,22 @@ public interface InstanceSupplier<T> {
|
104 | 102 | T get(BootstrapContext context);
|
105 | 103 |
|
106 | 104 | /**
|
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. |
109 | 107 | * @param <T> the instance type
|
110 | 108 | * @param instance the instance
|
111 |
| - * @return a new {@link InstanceFactory} |
| 109 | + * @return a new {@link InstanceSupplier} |
112 | 110 | */
|
113 | 111 | static <T> InstanceSupplier<T> of(T instance) {
|
114 | 112 | return (registry) -> instance;
|
115 | 113 | }
|
116 | 114 |
|
117 | 115 | /**
|
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 |
119 | 117 | * {@link Supplier}.
|
120 | 118 | * @param <T> the instance type
|
121 | 119 | * @param supplier the supplier that will provide the instance
|
122 |
| - * @return a new {@link InstanceFactory} |
| 120 | + * @return a new {@link InstanceSupplier} |
123 | 121 | */
|
124 | 122 | static <T> InstanceSupplier<T> from(Supplier<T> supplier) {
|
125 | 123 | return (registry) -> (supplier != null) ? supplier.get() : null;
|
|
0 commit comments