Package org.springframework.core.io

Examples of org.springframework.core.io.DescriptiveResource


  public void testError() throws Exception {
    new AssertThrows(BeanDefinitionParsingException.class) {
      public void test() throws Exception {
        FailFastProblemReporter reporter = new FailFastProblemReporter();
        reporter.error(new Problem("VGER", new Location(new DescriptiveResource("here")),
            null, new IllegalArgumentException()));
      }
    }.runTest();
  }
View Full Code Here


    }.runTest();
  }

  public void testWarn() throws Exception {
    IllegalArgumentException rootCause = new IllegalArgumentException();
    Problem problem = new Problem("VGER", new Location(new DescriptiveResource("here")),
        null, new IllegalArgumentException());

    MockControl mockLog = MockControl.createControl(Log.class);
    Log log = (Log) mockLog.getMock();
    log.warn(null, rootCause);
View Full Code Here

      if (f.exists()) {
        return new FileSystemResource(f);
      }
    }

    return new DescriptiveResource(location + " was not found in resource paths");
  }
View Full Code Here

  /**
   * Set a description of the resource that this bean definition
   * came from (for the purpose of showing context in case of errors).
   */
  public void setResourceDescription(String resourceDescription) {
    this.resource = new DescriptiveResource(resourceDescription);
  }
View Full Code Here

   * @throws BeanDefinitionStoreException in case of loading or parsing errors
   */
  public int loadBeanDefinitions(InputSource inputSource, String resourceDescription)
      throws BeanDefinitionStoreException {

    return doLoadBeanDefinitions(inputSource, new DescriptiveResource(resourceDescription));
  }
View Full Code Here

   * @throws BeanDefinitionStoreException in case of loading or parsing errors
   */
  public int loadBeanDefinitions(InputSource inputSource, String resourceDescription)
      throws BeanDefinitionStoreException {

    return doLoadBeanDefinitions(inputSource, new DescriptiveResource(resourceDescription));
  }
View Full Code Here

  /**
   * Set a description of the resource that this bean definition
   * came from (for the purpose of showing context in case of errors).
   */
  public void setResourceDescription(String resourceDescription) {
    this.resource = new DescriptiveResource(resourceDescription);
  }
View Full Code Here

    this.beanName = beanName;
  }

  public ConfigurationClass(Class<?> clazz, String beanName) {
    this.metadata = new StandardAnnotationMetadata(clazz);
    this.resource = new DescriptiveResource(clazz.toString());
    this.beanName = beanName;
  }
View Full Code Here

  /**
   * Set a description of the resource that this bean definition
   * came from (for the purpose of showing context in case of errors).
   */
  public void setResourceDescription(String resourceDescription) {
    this.resource = new DescriptiveResource(resourceDescription);
  }
View Full Code Here

   * @see ConfigurationClass#ConfigurationClass(Class, boolean)
   */
  public ConfigurationClass(Class<?> clazz, String beanName) {
    Assert.hasText(beanName, "bean name must not be null");
    this.metadata = new StandardAnnotationMetadata(clazz, true);
    this.resource = new DescriptiveResource(clazz.toString());
    this.beanName = beanName;
    this.imported = false;
  }
View Full Code Here

TOP

Related Classes of org.springframework.core.io.DescriptiveResource

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.