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 Methods
    Modifier and Type
    Method
    Description
    static String
    getRequiredBeanClassName(org.springframework.beans.factory.config.BeanDefinition beanDefinition)
    Returns the bean class name of the given BeanDefinition.
    getRequiredClassLoader(org.springframework.beans.factory.xml.XmlReaderContext context)
    Returns the ClassLoader used by the given XmlReaderContext.
    getRequiredClassLoader(org.springframework.core.io.ResourceLoader resourceLoader)
    Returns the ClassLoader used by the given ResourceLoader.
    static org.springframework.core.io.ResourceLoader
    getRequiredResourceLoader(org.springframework.beans.factory.xml.XmlReaderContext context)
    Returns the ResourceLoader from the given XmlReaderContext.
  • Method Details

    • getRequiredResourceLoader

      static org.springframework.core.io.ResourceLoader getRequiredResourceLoader(org.springframework.beans.factory.xml.XmlReaderContext context)
      Returns the ResourceLoader from the given XmlReaderContext.
      Parameters:
      context - must not be null.
      Returns:
      Throws:
      IllegalArgumentException - if no ResourceLoader can be obtained from the XmlReaderContext.
    • getRequiredClassLoader

      static ClassLoader getRequiredClassLoader(org.springframework.beans.factory.xml.XmlReaderContext context)
      Returns the ClassLoader used by the given XmlReaderContext.
      Parameters:
      context - must not be null.
      Returns:
      Throws:
      IllegalArgumentException - if no ClassLoader can be obtained from the given XmlReaderContext.
    • getRequiredClassLoader

      static ClassLoader getRequiredClassLoader(org.springframework.core.io.ResourceLoader resourceLoader)
      Returns the ClassLoader used by the given ResourceLoader.
      Parameters:
      resourceLoader - must not be null.
      Returns:
      Throws:
      IllegalArgumentException - if the given ResourceLoader does not expose a ClassLoader.
    • getRequiredBeanClassName

      static String getRequiredBeanClassName(org.springframework.beans.factory.config.BeanDefinition beanDefinition)
      Returns the bean class name of the given BeanDefinition.
      Parameters:
      beanDefinition - must not be null.
      Returns:
      Throws:
      IllegalArgumentException - if the given BeanDefinition does not contain a bean class name.