Package org.springframework.data.config
Interface ConfigurationUtils
public interface ConfigurationUtils
Helper class to centralize common functionality that needs to be used in various places of the configuration
implementation.
- Since:
- 2.0
- Author:
- Oliver Gierke, Johannes Englmeier
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic StringgetRequiredBeanClassName(BeanDefinition beanDefinition) Returns the bean class name of the givenBeanDefinition.static ClassLoadergetRequiredClassLoader(XmlReaderContext context) Returns theClassLoaderused by the givenXmlReaderContext.static ClassLoadergetRequiredClassLoader(ResourceLoader resourceLoader) Returns theClassLoaderused by the givenResourceLoader.static ResourceLoaderReturns theResourceLoaderfrom the givenXmlReaderContext.
-
Method Details
-
getRequiredResourceLoader
Returns theResourceLoaderfrom the givenXmlReaderContext.- Parameters:
context- must not be null.- Returns:
- Throws:
IllegalArgumentException- if noResourceLoadercan be obtained from theXmlReaderContext.
-
getRequiredClassLoader
Returns theClassLoaderused by the givenXmlReaderContext.- Parameters:
context- must not be null.- Returns:
- Throws:
IllegalArgumentException- if noClassLoadercan be obtained from the givenXmlReaderContext.
-
getRequiredClassLoader
Returns theClassLoaderused by the givenResourceLoader.- Parameters:
resourceLoader- must not be null.- Returns:
- Throws:
IllegalArgumentException- if the givenResourceLoaderdoes not expose aClassLoader.
-
getRequiredBeanClassName
Returns the bean class name of the givenBeanDefinition.- Parameters:
beanDefinition- must not be null.- Returns:
- Throws:
IllegalArgumentException- if the givenBeanDefinitiondoes not contain a bean class name.
-