Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
ea5c6c29
Commit
ea5c6c29
authored
Sep 17, 2020
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish BootstrapRegistry's javadoc
See gh-23326
parent
986a9a49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
BootstrapRegistry.java
...main/java/org/springframework/boot/BootstrapRegistry.java
+6
-8
No files found.
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BootstrapRegistry.java
View file @
ea5c6c29
...
@@ -18,8 +18,6 @@ package org.springframework.boot;
...
@@ -18,8 +18,6 @@ package org.springframework.boot;
import
java.util.function.Supplier
;
import
java.util.function.Supplier
;
import
io.undertow.servlet.api.InstanceFactory
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationListener
;
import
org.springframework.context.ApplicationListener
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.Environment
;
...
@@ -73,7 +71,7 @@ public interface BootstrapRegistry {
...
@@ -73,7 +71,7 @@ public interface BootstrapRegistry {
<
T
>
boolean
isRegistered
(
Class
<
T
>
type
);
<
T
>
boolean
isRegistered
(
Class
<
T
>
type
);
/**
/**
* Return any existing {@link Instance
Factory
} for the given type.
* Return any existing {@link Instance
Supplier
} for the given type.
* @param <T> the instance type
* @param <T> the instance type
* @param type the instance type
* @param type the instance type
* @return the registered {@link InstanceSupplier} or {@code null}
* @return the registered {@link InstanceSupplier} or {@code null}
...
@@ -104,22 +102,22 @@ public interface BootstrapRegistry {
...
@@ -104,22 +102,22 @@ public interface BootstrapRegistry {
T
get
(
BootstrapContext
context
);
T
get
(
BootstrapContext
context
);
/**
/**
* Factory method that can be used to create a {@link Instance
Factory} for a given
* Factory method that can be used to create a {@link Instance
Supplier} for a
* instance.
*
given
instance.
* @param <T> the instance type
* @param <T> the instance type
* @param instance the instance
* @param instance the instance
* @return a new {@link Instance
Factory
}
* @return a new {@link Instance
Supplier
}
*/
*/
static
<
T
>
InstanceSupplier
<
T
>
of
(
T
instance
)
{
static
<
T
>
InstanceSupplier
<
T
>
of
(
T
instance
)
{
return
(
registry
)
->
instance
;
return
(
registry
)
->
instance
;
}
}
/**
/**
* Factory method that can be used to create a {@link Instance
Factory
} from a
* Factory method that can be used to create a {@link Instance
Supplier
} from a
* {@link Supplier}.
* {@link Supplier}.
* @param <T> the instance type
* @param <T> the instance type
* @param supplier the supplier that will provide the instance
* @param supplier the supplier that will provide the instance
* @return a new {@link Instance
Factory
}
* @return a new {@link Instance
Supplier
}
*/
*/
static
<
T
>
InstanceSupplier
<
T
>
from
(
Supplier
<
T
>
supplier
)
{
static
<
T
>
InstanceSupplier
<
T
>
from
(
Supplier
<
T
>
supplier
)
{
return
(
registry
)
->
(
supplier
!=
null
)
?
supplier
.
get
()
:
null
;
return
(
registry
)
->
(
supplier
!=
null
)
?
supplier
.
get
()
:
null
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment