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
(BeanDefinition beanDefinition) Returns the bean class name of the givenBeanDefinition
.static ClassLoader
getRequiredClassLoader
(XmlReaderContext context) Returns theClassLoader
used by the givenXmlReaderContext
.static ClassLoader
getRequiredClassLoader
(ResourceLoader resourceLoader) Returns theClassLoader
used by the givenResourceLoader
.static ResourceLoader
Returns theResourceLoader
from the givenXmlReaderContext
.
-
Method Details
-
getRequiredResourceLoader
Returns theResourceLoader
from the givenXmlReaderContext
.- Parameters:
context
- must not be null.- Returns:
- Throws:
IllegalArgumentException
- if noResourceLoader
can be obtained from theXmlReaderContext
.
-
getRequiredClassLoader
Returns theClassLoader
used by the givenXmlReaderContext
.- Parameters:
context
- must not be null.- Returns:
- Throws:
IllegalArgumentException
- if noClassLoader
can be obtained from the givenXmlReaderContext
.
-
getRequiredClassLoader
Returns theClassLoader
used by the givenResourceLoader
.- Parameters:
resourceLoader
- must not be null.- Returns:
- Throws:
IllegalArgumentException
- if the givenResourceLoader
does not expose aClassLoader
.
-
getRequiredBeanClassName
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.
-