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(org.springframework.beans.factory.config.BeanDefinition beanDefinition) Returns the bean class name of the givenBeanDefinition.static ClassLoadergetRequiredClassLoader(org.springframework.beans.factory.xml.XmlReaderContext context) Returns theClassLoaderused by the givenXmlReaderContext.static ClassLoadergetRequiredClassLoader(org.springframework.core.io.ResourceLoader resourceLoader) Returns theClassLoaderused by the givenResourceLoader.static org.springframework.core.io.ResourceLoadergetRequiredResourceLoader(org.springframework.beans.factory.xml.XmlReaderContext context) Returns theResourceLoaderfrom the givenXmlReaderContext.
-
Method Details
-
getRequiredResourceLoader
static org.springframework.core.io.ResourceLoader getRequiredResourceLoader(org.springframework.beans.factory.xml.XmlReaderContext context) Returns theResourceLoaderfrom the givenXmlReaderContext.- Parameters:
context- must not be null.- Returns:
- Throws:
IllegalArgumentException- if noResourceLoadercan be obtained from theXmlReaderContext.
-
getRequiredClassLoader
static ClassLoader getRequiredClassLoader(org.springframework.beans.factory.xml.XmlReaderContext context) Returns theClassLoaderused by the givenXmlReaderContext.- Parameters:
context- must not be null.- Returns:
- Throws:
IllegalArgumentException- if noClassLoadercan be obtained from the givenXmlReaderContext.
-
getRequiredClassLoader
static ClassLoader getRequiredClassLoader(org.springframework.core.io.ResourceLoader resourceLoader) Returns theClassLoaderused by the givenResourceLoader.- Parameters:
resourceLoader- must not be null.- Returns:
- Throws:
IllegalArgumentException- if the givenResourceLoaderdoes not expose aClassLoader.
-
getRequiredBeanClassName
static String getRequiredBeanClassName(org.springframework.beans.factory.config.BeanDefinition beanDefinition) 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.
-