Class SpringBootApplicationRuntime
java.lang.Object
org.springframework.modulith.runtime.autoconfigure.SpringBootApplicationRuntime
- All Implemented Interfaces:
ApplicationRuntime
ApplicationRuntime
implementation based on an ApplicationContext
and a class that's annotated with
SpringBootApplication
.- Author:
- Oliver Drotbohm
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newSpringBootApplicationRuntime
for the givenApplicationContext
. -
Method Summary
Modifier and TypeMethodDescriptiongetId()
Returns the identifier of the application.Class<?>
Returns the primary application class.Class<?>
getUserClass
(Object bean, String beanName) Obtain the end user class for the given bean and bean name.boolean
isApplicationClass
(Class<?> type) Returns whether the given type is an application class, i.e.
-
Constructor Details
-
SpringBootApplicationRuntime
SpringBootApplicationRuntime(ApplicationContext context) Creates a newSpringBootApplicationRuntime
for the givenApplicationContext
.- Parameters:
context
- must not be null.
-
-
Method Details
-
getId
Description copied from interface:ApplicationRuntime
Returns the identifier of the application.- Specified by:
getId
in interfaceApplicationRuntime
- Returns:
- will never be null.
-
getMainApplicationClass
Description copied from interface:ApplicationRuntime
Returns the primary application class.- Specified by:
getMainApplicationClass
in interfaceApplicationRuntime
- Returns:
- will never be null.
-
getUserClass
Description copied from interface:ApplicationRuntime
Obtain the end user class for the given bean and bean name. Necessary to reveal the actual user type from potentially proxied instances.- Specified by:
getUserClass
in interfaceApplicationRuntime
- Parameters:
bean
- must not be null.beanName
- must not be null or empty.- Returns:
- will never be null.
-
isApplicationClass
Description copied from interface:ApplicationRuntime
Returns whether the given type is an application class, i.e. user code in one of the application packages.- Specified by:
isApplicationClass
in interfaceApplicationRuntime
- Parameters:
type
- must not be null.- Returns:
- whether the given type is an application class, i.e. user code in one of the application packages.
-