Top Description Methods
org.springframework.context.annotation

public Interface ConditionContext

Known Direct Implementers
org.springframework.context.annotation.ConditionEvaluator.ConditionContextImpl
Imports
org.springframework.beans.factory.config.ConfigurableListableBeanFactory, org.springframework.beans.factory.support.BeanDefinitionRegistry, org.springframework.core.env.Environment, org.springframework.core.io.ResourceLoader, org.springframework.lang.Nullable

Context information for use by Condition implementations.
Authors
Phillip Webb, Juergen Hoeller
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public 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).

public ClassLoader
getClassLoader()

Return the ClassLoader that should be used to load additional classes (only null if even the system ClassLoader isn't accessible).

public Environment
getEnvironment()

Return the Environment for which the current application is running.

public BeanDefinitionRegistry
getRegistry()

Return the BeanDefinitionRegistry that will hold the bean definition should the condition match.

public ResourceLoader
getResourceLoader()

Return the ResourceLoader currently being used.

Method Detail

getBeanFactoryback to summary
public 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).

Annotations
@Nullable
getClassLoaderback to summary
public ClassLoader getClassLoader()

Return the ClassLoader that should be used to load additional classes (only null if even the system ClassLoader isn't accessible).

Annotations
@Nullable
See Also
org.springframework.util.ClassUtils#forName(String, ClassLoader)
getEnvironmentback to summary
public Environment getEnvironment()

Return the Environment for which the current application is running.

getRegistryback to summary
public BeanDefinitionRegistry getRegistry()

Return the BeanDefinitionRegistry that will hold the bean definition should the condition match.

Exceptions
IllegalStateException:
if no registry is available (which is unusual: only the case with a plain ClassPathScanningCandidateComponentProvider)
getResourceLoaderback to summary
public ResourceLoader getResourceLoader()

Return the ResourceLoader currently being used.