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
Modifier and TypeMethodDescriptionstatic String
getRequiredBeanClassName
(org.springframework.beans.factory.config.BeanDefinition beanDefinition) Returns the bean class name of the givenBeanDefinition
.static ClassLoader
getRequiredClassLoader
(org.springframework.beans.factory.xml.XmlReaderContext context) Returns theClassLoader
used by the givenXmlReaderContext
.static ClassLoader
getRequiredClassLoader
(org.springframework.core.io.ResourceLoader resourceLoader) Returns theClassLoader
used by the givenResourceLoader
.static org.springframework.core.io.ResourceLoader
getRequiredResourceLoader
(org.springframework.beans.factory.xml.XmlReaderContext context) Returns theResourceLoader
from the givenXmlReaderContext
.
-
Method Details
-
getRequiredResourceLoader
static org.springframework.core.io.ResourceLoader getRequiredResourceLoader(org.springframework.beans.factory.xml.XmlReaderContext context) Returns theResourceLoader
from the givenXmlReaderContext
.- Parameters:
context
- must not be null.- Returns:
- Throws:
IllegalArgumentException
- if noResourceLoader
can be obtained from theXmlReaderContext
.
-
getRequiredClassLoader
static ClassLoader getRequiredClassLoader(org.springframework.beans.factory.xml.XmlReaderContext context) Returns theClassLoader
used by the givenXmlReaderContext
.- Parameters:
context
- must not be null.- Returns:
- Throws:
IllegalArgumentException
- if noClassLoader
can be obtained from the givenXmlReaderContext
.
-
getRequiredClassLoader
static ClassLoader getRequiredClassLoader(org.springframework.core.io.ResourceLoader resourceLoader) Returns theClassLoader
used by the givenResourceLoader
.- Parameters:
resourceLoader
- must not be null.- Returns:
- Throws:
IllegalArgumentException
- if the givenResourceLoader
does 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 givenBeanDefinition
does not contain a bean class name.
-