Class AotServices<T>
java.lang.Object
org.springframework.beans.factory.aot.AotServices<T>
- Type Parameters:
T- the service type
- All Implemented Interfaces:
Iterable<T>
A collection of AOT services that can be
loaded from
a SpringFactoriesLoader or obtained from a ListableBeanFactory.- Since:
- 6.0
- Author:
- Phillip Webb
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classLoader class used to actually load the services.static enumSources from which services were obtained. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionasList()Return the AOT services as aList.static AotServices.LoaderCreate a newAotServices.Loaderthat will obtain AOT services from "META-INF/spring/aot.factories"<T>.static AotServices.Loaderfactories(@Nullable ClassLoader classLoader) Create a newAotServices.Loaderthat will obtain AOT services from "META-INF/spring/aot.factories"<T>.static AotServices.Loaderfactories(SpringFactoriesLoader springFactoriesLoader) Create a newAotServices.Loaderthat will obtain AOT services from the givenSpringFactoriesLoader.static AotServices.LoaderfactoriesAndBeans(ListableBeanFactory beanFactory) Create a newAotServices.Loaderthat will obtain AOT services from "META-INF/spring/aot.factories"<T> as well as the givenListableBeanFactory.static AotServices.LoaderfactoriesAndBeans(SpringFactoriesLoader springFactoriesLoader, ListableBeanFactory beanFactory) Create a newAotServices.Loaderthat will obtain AOT services from the givenSpringFactoriesLoaderandListableBeanFactory.findByBeanName(String beanName) Find the AOT service that was loaded for the given bean name.Get the source of the given service.iterator()stream()Return aStreamof the AOT services.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
FACTORIES_RESOURCE_LOCATION
The location to look for AOT factories.- See Also:
-
-
Method Details
-
factories
Create a newAotServices.Loaderthat will obtain AOT services from "META-INF/spring/aot.factories"<T>.- Returns:
- a new
AotServices.Loaderinstance
-
factories
Create a newAotServices.Loaderthat will obtain AOT services from "META-INF/spring/aot.factories"<T>.- Parameters:
classLoader- the class loader used to load the factories resource- Returns:
- a new
AotServices.Loaderinstance
-
factories
Create a newAotServices.Loaderthat will obtain AOT services from the givenSpringFactoriesLoader.- Parameters:
springFactoriesLoader- the spring factories loader- Returns:
- a new
AotServices.Loaderinstance
-
factoriesAndBeans
Create a newAotServices.Loaderthat will obtain AOT services from "META-INF/spring/aot.factories"<T> as well as the givenListableBeanFactory.- Parameters:
beanFactory- the bean factory- Returns:
- a new
AotServices.Loaderinstance
-
factoriesAndBeans
public static AotServices.Loader factoriesAndBeans(SpringFactoriesLoader springFactoriesLoader, ListableBeanFactory beanFactory) Create a newAotServices.Loaderthat will obtain AOT services from the givenSpringFactoriesLoaderandListableBeanFactory.- Parameters:
springFactoriesLoader- the spring factories loaderbeanFactory- the bean factory- Returns:
- a new
AotServices.Loaderinstance
-
iterator
-
stream
-
asList
-
findByBeanName
-
getSource
Get the source of the given service.- Parameters:
service- the service instance- Returns:
- the source of the service
-