public interface ConditionContext
Condition
s.Modifier and Type | Method and Description |
---|---|
ConfigurableListableBeanFactory |
getBeanFactory()
Return the
ConfigurableListableBeanFactory that will hold the bean
definition should the condition match, or null if the bean factory is
not available (or not downcastable to ConfigurableListableBeanFactory ). |
ClassLoader |
getClassLoader()
Return the
ClassLoader that should be used to load additional classes
(only null if even the system ClassLoader isn't accessible). |
Environment |
getEnvironment()
Return the
Environment for which the current application is running. |
BeanDefinitionRegistry |
getRegistry()
Return the
BeanDefinitionRegistry that will hold the bean definition
should the condition match. |
ResourceLoader |
getResourceLoader()
Return the
ResourceLoader currently being used. |
BeanDefinitionRegistry getRegistry()
BeanDefinitionRegistry
that will hold the bean definition
should the condition match.IllegalStateException
- if no registry is available (which is unusual:
only the case with a plain ClassPathScanningCandidateComponentProvider
)@Nullable ConfigurableListableBeanFactory getBeanFactory()
ConfigurableListableBeanFactory
that will hold the bean
definition should the condition match, or null
if the bean factory is
not available (or not downcastable to ConfigurableListableBeanFactory
).Environment getEnvironment()
Environment
for which the current application is running.ResourceLoader getResourceLoader()
ResourceLoader
currently being used.@Nullable ClassLoader getClassLoader()
ClassLoader
that should be used to load additional classes
(only null
if even the system ClassLoader isn't accessible).ClassUtils.forName(String, ClassLoader)