Interface ConditionContext
public interface ConditionContext
Context information for use by
Condition implementations.- Since:
- 4.0
- Author:
- Phillip Webb, Juergen Hoeller
-
Method Summary
Modifier and TypeMethodDescriptionReturn theConfigurableListableBeanFactorythat will hold the bean definition should the condition match, ornullif the bean factory is not available (or not downcastable toConfigurableListableBeanFactory).Return theClassLoaderthat should be used to load additional classes (onlynullif even the system ClassLoader isn't accessible).Return theEnvironmentfor which the current application is running.Return theBeanDefinitionRegistrythat will hold the bean definition should the condition match.Return theResourceLoadercurrently being used.
-
Method Details
-
getRegistry
BeanDefinitionRegistry getRegistry()Return theBeanDefinitionRegistrythat 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
Return theConfigurableListableBeanFactorythat will hold the bean definition should the condition match, ornullif the bean factory is not available (or not downcastable toConfigurableListableBeanFactory). -
getEnvironment
Environment getEnvironment()Return theEnvironmentfor which the current application is running. -
getResourceLoader
ResourceLoader getResourceLoader()Return theResourceLoadercurrently being used. -
getClassLoader
Return theClassLoaderthat should be used to load additional classes (onlynullif even the system ClassLoader isn't accessible).- See Also:
-