Package org.springframework.beans.factory.parsing

Examples of org.springframework.beans.factory.parsing.Location


  public ConfigurationClass getConfigurationClass() {
    return this.configurationClass;
  }

  public Location getResourceLocation() {
    return new Location(this.configurationClass.getResource(), this.metadata);
  }
View Full Code Here


   */
  private class FinalConfigurationProblem extends Problem {

    public FinalConfigurationProblem() {
      super(String.format("@Configuration class '%s' may not be final. Remove the final modifier to continue.",
          getSimpleName()), new Location(getResource(), getMetadata()));
    }
View Full Code Here

  private class BeanMethodOverloadingProblem extends Problem {

    public BeanMethodOverloadingProblem(String methodName, int count) {
      super(String.format("@Configuration class '%s' has %s overloaded @Bean methods named '%s'. " +
          "Only one @Bean method of a given name is allowed within each @Configuration class.",
          getSimpleName(), count, methodName), new Location(getResource(), getMetadata()));
    }
View Full Code Here

    public CircularImportProblem(ConfigurationClass attemptedImport, Stack<ConfigurationClass> importStack, AnnotationMetadata metadata) {
      super(String.format("A circular @Import has been detected: " +
          "Illegal attempt by @Configuration class '%s' to import class '%s' as '%s' is " +
          "already present in the current import stack [%s]", importStack.peek().getSimpleName(),
          attemptedImport.getSimpleName(), attemptedImport.getSimpleName(), importStack),
          new Location(importStack.peek().getResource(), metadata));
    }
View Full Code Here

  private static class InvalidConfigurationImportProblem extends Problem {
    public InvalidConfigurationImportProblem(String className, Resource resource, AnnotationMetadata metadata) {
      super(String.format("%s was @Import'ed but is not annotated with @Configuration " +
          "nor does it declare any @Bean methods; it does not implement ImportSelector " +
          "or extend ImportBeanDefinitionRegistrar. Update the class to meet one of these requirements " +
          "or do not attempt to @Import it.", className), new Location(resource, metadata));
    }
View Full Code Here

    public CircularImportProblem(ConfigurationClass attemptedImport, Stack<ConfigurationClass> importStack, AnnotationMetadata metadata) {
      super(String.format("A circular @Import has been detected: " +
          "Illegal attempt by @Configuration class '%s' to import class '%s' as '%s' is " +
          "already present in the current import stack [%s]", importStack.peek().getSimpleName(),
          attemptedImport.getSimpleName(), attemptedImport.getSimpleName(), importStack),
          new Location(importStack.peek().getResource(), metadata));
    }
View Full Code Here

    public InvalidConfigurationImportProblem(String className, Resource resource, AnnotationMetadata metadata) {
      super(String.format("%s was @Import'ed but is not annotated with @Configuration " +
          "nor does it declare any @Bean methods; it does not implement ImportSelector " +
          "or extend ImportBeanDefinitionRegistrar. Update the class to meet one of these requirements " +
          "or do not attempt to @Import it.", className), new Location(resource, metadata));
    }
View Full Code Here

   */
  private class FinalConfigurationProblem extends Problem {

    public FinalConfigurationProblem() {
      super(String.format("@Configuration class '%s' may not be final. Remove the final modifier to continue.",
          getSimpleName()), new Location(getResource(), getMetadata()));
    }
View Full Code Here

  private class BeanMethodOverloadingProblem extends Problem {

    public BeanMethodOverloadingProblem(String methodName, int count) {
      super(String.format("@Configuration class '%s' has %s overloaded @Bean methods named '%s'. " +
          "Only one @Bean method of a given name is allowed within each @Configuration class.",
          getSimpleName(), count, methodName), new Location(getResource(), getMetadata()));
    }
View Full Code Here

            final NamespaceHandler namespaceHandler = namespaceHandlerResolver.resolve(uri);
            if (namespaceHandler == null) {
                throw new BeanDefinitionParsingException(
                      new Problem("No namespace handler found for URI: " + uri,
                            new Location(readerContext.getResource())));
            }
            namespaceHandlers.put(namespace, namespaceHandler);
            namespaces.put(namespace, uri);
        }
    }
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.parsing.Location

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.