public final class BeanDefinitionUtils extends Object
BeanDefinition
instances from BeanFactoryPostProcessor
s.Modifier and Type | Class and Description |
---|---|
static class |
BeanDefinitionUtils.EntityManagerFactoryBeanDefinition
Value object to represent a
BeanDefinition for an EntityManagerFactory with a dedicated bean name. |
Modifier and Type | Method and Description |
---|---|
static BeanDefinition |
getBeanDefinition(String name,
ConfigurableListableBeanFactory beanFactory)
Returns the
BeanDefinition with the given name, obtained from the given BeanFactory or one of its
parents. |
static Collection<BeanDefinitionUtils.EntityManagerFactoryBeanDefinition> |
getEntityManagerFactoryBeanDefinitions(ConfigurableListableBeanFactory beanFactory)
Returns
BeanDefinitionUtils.EntityManagerFactoryBeanDefinition instances for all BeanDefinition registered in the given
ConfigurableListableBeanFactory hierarchy. |
static Iterable<String> |
getEntityManagerFactoryBeanNames(ListableBeanFactory beanFactory)
Return all bean names for bean definitions that will result in an
EntityManagerFactory eventually. |
public static Iterable<String> getEntityManagerFactoryBeanNames(ListableBeanFactory beanFactory)
EntityManagerFactory
eventually. We're
checking for EntityManagerFactory
and the well-known factory beans here to avoid eager initialization of
the factory beans. The double lookup is necessary especially for JavaConfig scenarios as people might declare an
EntityManagerFactory
directly.beanFactory
- public static Collection<BeanDefinitionUtils.EntityManagerFactoryBeanDefinition> getEntityManagerFactoryBeanDefinitions(ConfigurableListableBeanFactory beanFactory)
BeanDefinitionUtils.EntityManagerFactoryBeanDefinition
instances for all BeanDefinition
registered in the given
ConfigurableListableBeanFactory
hierarchy.beanFactory
- must not be null.public static BeanDefinition getBeanDefinition(String name, ConfigurableListableBeanFactory beanFactory)
BeanDefinition
with the given name, obtained from the given BeanFactory
or one of its
parents.name
- beanFactory
- Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.