接口 ConditionContext
public interface ConditionContext
Context information for use byConditions.- 从以下版本开始:
- 4.0
- 作者:
- Phillip Webb, Juergen Hoeller
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 ConfigurableListableBeanFactorygetBeanFactory()Return theConfigurableListableBeanFactorythat will hold the bean definition should the condition match, ornullif the bean factory is not available.ClassLoadergetClassLoader()Return theClassLoaderthat should be used to load additional classes, ornullif the default classloader should be used.EnvironmentgetEnvironment()Return theEnvironmentfor which the current application is running, ornullif no environment is available.BeanDefinitionRegistrygetRegistry()Return theBeanDefinitionRegistrythat will hold the bean definition should the condition match, ornullif the registry is not available.ResourceLoadergetResourceLoader()Return theResourceLoadercurrently being used, ornullif the resource loader cannot be obtained.
方法详细资料
getRegistry
BeanDefinitionRegistry getRegistry()
Return theBeanDefinitionRegistrythat will hold the bean definition should the condition match, ornullif the registry is not available.
getBeanFactory
ConfigurableListableBeanFactory getBeanFactory()
Return theConfigurableListableBeanFactorythat will hold the bean definition should the condition match, ornullif the bean factory is not available.
getEnvironment
Environment getEnvironment()
Return theEnvironmentfor which the current application is running, ornullif no environment is available.
getResourceLoader
ResourceLoader getResourceLoader()
Return theResourceLoadercurrently being used, ornullif the resource loader cannot be obtained.
getClassLoader
ClassLoader getClassLoader()
Return theClassLoaderthat should be used to load additional classes, ornullif the default classloader should be used.