private static class ConditionEvaluator.ConditionContextImpl extends java.lang.Object implements ConditionContext
ConditionContext
.Modifier and Type | Field and Description |
---|---|
private ConfigurableListableBeanFactory |
beanFactory |
private Environment |
environment |
private BeanDefinitionRegistry |
registry |
private ResourceLoader |
resourceLoader |
Constructor and Description |
---|
ConditionContextImpl(BeanDefinitionRegistry registry,
Environment environment,
ResourceLoader resourceLoader) |
Modifier and Type | Method and Description |
---|---|
private ConfigurableListableBeanFactory |
deduceBeanFactory(BeanDefinitionRegistry source) |
private Environment |
deduceEnvironment(BeanDefinitionRegistry source) |
private ResourceLoader |
deduceResourceLoader(BeanDefinitionRegistry source) |
ConfigurableListableBeanFactory |
getBeanFactory()
Return the
ConfigurableListableBeanFactory that will hold the bean
definition should the condition match or null if the bean factory
is not available. |
java.lang.ClassLoader |
getClassLoader()
Return the
ClassLoader that should be used to load additional
classes or null if the default classloader should be used. |
Environment |
getEnvironment()
Return the
Environment for which the current application is running
or null if no environment is available. |
BeanDefinitionRegistry |
getRegistry()
Return the
BeanDefinitionRegistry that will hold the bean definition
should the condition match or null if the registry is not available. |
ResourceLoader |
getResourceLoader()
Return the
ResourceLoader currently being used or null
if the resource loader cannot be obtained. |
private final BeanDefinitionRegistry registry
private final ConfigurableListableBeanFactory beanFactory
private final Environment environment
private final ResourceLoader resourceLoader
public ConditionContextImpl(BeanDefinitionRegistry registry, Environment environment, ResourceLoader resourceLoader)
private ConfigurableListableBeanFactory deduceBeanFactory(BeanDefinitionRegistry source)
private Environment deduceEnvironment(BeanDefinitionRegistry source)
private ResourceLoader deduceResourceLoader(BeanDefinitionRegistry source)
public BeanDefinitionRegistry getRegistry()
ConditionContext
BeanDefinitionRegistry
that will hold the bean definition
should the condition match or null
if the registry is not available.getRegistry
in interface ConditionContext
null
public ConfigurableListableBeanFactory getBeanFactory()
ConditionContext
ConfigurableListableBeanFactory
that will hold the bean
definition should the condition match or null
if the bean factory
is not available.getBeanFactory
in interface ConditionContext
null
public Environment getEnvironment()
ConditionContext
Environment
for which the current application is running
or null
if no environment is available.getEnvironment
in interface ConditionContext
null
public ResourceLoader getResourceLoader()
ConditionContext
ResourceLoader
currently being used or null
if the resource loader cannot be obtained.getResourceLoader
in interface ConditionContext
null
public java.lang.ClassLoader getClassLoader()
ConditionContext
ClassLoader
that should be used to load additional
classes or null
if the default classloader should be used.getClassLoader
in interface ConditionContext
null