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.ConfigurableListableBeanFactoryReturn 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).org.springframework.core.env.EnvironmentReturn theEnvironmentfor which the current application is running.org.springframework.beans.factory.support.BeanDefinitionRegistryReturn theBeanDefinitionRegistrythat will hold the bean definition should the condition match.org.springframework.core.io.ResourceLoaderReturn theResourceLoadercurrently being used.
-
Method Details
-
getRegistry
org.springframework.beans.factory.support.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
@Nullable org.springframework.beans.factory.config.ConfigurableListableBeanFactory getBeanFactory()Return theConfigurableListableBeanFactorythat will hold the bean definition should the condition match, ornullif the bean factory is not available (or not downcastable toConfigurableListableBeanFactory). -
getEnvironment
org.springframework.core.env.Environment getEnvironment()Return theEnvironmentfor which the current application is running. -
getResourceLoader
org.springframework.core.io.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:
-
ClassUtils.forName(String, ClassLoader)
-