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 newSpringBootApplicationRuntimefor 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.booleanisApplicationClass(Class<?> type) Returns whether the given type is an application class, i.e.
-
Constructor Details
-
SpringBootApplicationRuntime
SpringBootApplicationRuntime(ApplicationContext context) Creates a newSpringBootApplicationRuntimefor the givenApplicationContext.- Parameters:
context- must not be null.
-
-
Method Details
-
getId
Description copied from interface:ApplicationRuntimeReturns the identifier of the application.- Specified by:
getIdin interfaceApplicationRuntime- Returns:
- will never be null.
-
getMainApplicationClass
Description copied from interface:ApplicationRuntimeReturns the primary application class.- Specified by:
getMainApplicationClassin interfaceApplicationRuntime- Returns:
- will never be null.
-
getUserClass
Description copied from interface:ApplicationRuntimeObtain the end user class for the given bean and bean name. Necessary to reveal the actual user type from potentially proxied instances.- Specified by:
getUserClassin interfaceApplicationRuntime- Parameters:
bean- must not be null.beanName- must not be null or empty.- Returns:
- will never be null.
-
isApplicationClass
Description copied from interface:ApplicationRuntimeReturns whether the given type is an application class, i.e. user code in one of the application packages.- Specified by:
isApplicationClassin 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.
-