本文整理汇总了Java中org.springframework.beans.factory.ListableBeanFactory.containsBeanDefinition方法的典型用法代码示例。如果您正苦于以下问题:Java ListableBeanFactory.containsBeanDefinition方法的具体用法?Java ListableBeanFactory.containsBeanDefinition怎么用?Java ListableBeanFactory.containsBeanDefinition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.beans.factory.ListableBeanFactory
的用法示例。
在下文中一共展示了ListableBeanFactory.containsBeanDefinition方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isBeanDefinitionAbstract
import org.springframework.beans.factory.ListableBeanFactory; //导入方法依赖的package包/类
/**
* Return whether the specified bean definition should be considered as abstract.
*/
private boolean isBeanDefinitionAbstract(ListableBeanFactory beanFactory, String beanName) {
return (beanFactory instanceof ConfigurableListableBeanFactory && beanFactory.containsBeanDefinition(beanName) &&
((ConfigurableListableBeanFactory) beanFactory).getBeanDefinition(beanName).isAbstract());
}
示例2: isBeanDefinitionLazyInit
import org.springframework.beans.factory.ListableBeanFactory; //导入方法依赖的package包/类
/**
* Return whether the specified bean definition should be considered as lazy-init.
* @param beanFactory the bean factory that is supposed to contain the bean definition
* @param beanName the name of the bean to check
* @see org.springframework.beans.factory.config.ConfigurableListableBeanFactory#getBeanDefinition
* @see org.springframework.beans.factory.config.BeanDefinition#isLazyInit
*/
protected boolean isBeanDefinitionLazyInit(ListableBeanFactory beanFactory, String beanName) {
return (beanFactory instanceof ConfigurableListableBeanFactory && beanFactory.containsBeanDefinition(beanName) &&
((ConfigurableListableBeanFactory) beanFactory).getBeanDefinition(beanName).isLazyInit());
}