Interface ConditionContext
public interface ConditionContext
Context information for use by
Condition
implementations.- Since:
- 4.0
- Author:
- Phillip Webb, Juergen Hoeller
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.beans.factory.config.ConfigurableListableBeanFactory
Return theConfigurableListableBeanFactory
that will hold the bean definition should the condition match, ornull
if the bean factory is not available (or not downcastable toConfigurableListableBeanFactory
).Return theClassLoader
that should be used to load additional classes (onlynull
if even the system ClassLoader isn't accessible).org.springframework.core.env.Environment
Return theEnvironment
for which the current application is running.org.springframework.beans.factory.support.BeanDefinitionRegistry
Return theBeanDefinitionRegistry
that will hold the bean definition should the condition match.org.springframework.core.io.ResourceLoader
Return theResourceLoader
currently being used.
-
Method Details
-
getRegistry
org.springframework.beans.factory.support.BeanDefinitionRegistry getRegistry()Return theBeanDefinitionRegistry
that will hold the bean definition should the condition match.- Throws:
IllegalStateException
- if no registry is available (which is unusual: only the case with a plainClassPathScanningCandidateComponentProvider
)
-
getBeanFactory
@Nullable org.springframework.beans.factory.config.ConfigurableListableBeanFactory getBeanFactory()Return theConfigurableListableBeanFactory
that will hold the bean definition should the condition match, ornull
if the bean factory is not available (or not downcastable toConfigurableListableBeanFactory
). -
getEnvironment
org.springframework.core.env.Environment getEnvironment()Return theEnvironment
for which the current application is running. -
getResourceLoader
org.springframework.core.io.ResourceLoader getResourceLoader()Return theResourceLoader
currently being used. -
getClassLoader
Return theClassLoader
that should be used to load additional classes (onlynull
if even the system ClassLoader isn't accessible).- See Also:
-
ClassUtils.forName(String, ClassLoader)
-