Java 类org.springframework.beans.factory.parsing.ImportDefinition 实例源码

项目:alfresco-repository    文件:ContextDependencyLister.java   
public void importProcessed(ImportDefinition paramImportDefinition) {
   String context = paramImportDefinition.getImportedResource();

   if(context.startsWith("classpath:")) {
      context = context.substring(10);

      if(pathToSlash == null) {
         URL c = ContextDependencyLister.class.getClassLoader().getResource(context);
         uriToSlash = c.toString().replace(context, "");
         pathToSlash = c.getPath().replace(context, "");
      }
   }
   if(context.startsWith("classpath*:")) {
      context = context.substring(11);
   }

   // Store
   if(! usedContextFiles.contains(context)) {
      usedContextFiles.add( context );
   }
   importedContextFiles.add( context );
}
项目:community-edition-old    文件:ContextDependencyLister.java   
public void importProcessed(ImportDefinition paramImportDefinition) {
   String context = paramImportDefinition.getImportedResource();

   if(context.startsWith("classpath:")) {
      context = context.substring(10);

      if(pathToSlash == null) {
         URL c = ContextDependencyLister.class.getClassLoader().getResource(context);
         uriToSlash = c.toString().replace(context, "");
         pathToSlash = c.getPath().replace(context, "");
      }
   }
   if(context.startsWith("classpath*:")) {
      context = context.substring(11);
   }

   // Store
   if(! usedContextFiles.contains(context)) {
      usedContextFiles.add( context );
   }
   importedContextFiles.add( context );
}
项目:spring4-understanding    文件:EventPublicationTests.java   
@Test
public void importEventReceived() throws Exception {
    List imports = this.eventListener.getImports();
    assertEquals(1, imports.size());
    ImportDefinition importDefinition = (ImportDefinition) imports.get(0);
    assertEquals("beanEventsImported.xml", importDefinition.getImportedResource());
    assertTrue(importDefinition.getSource() instanceof Element);
}
项目:class-guard    文件:EventPublicationTests.java   
public void testImportEventReceived() throws Exception {
    List imports = this.eventListener.getImports();
    assertEquals(1, imports.size());
    ImportDefinition importDefinition = (ImportDefinition) imports.get(0);
    assertEquals("beanEventsImported.xml", importDefinition.getImportedResource());
    assertTrue(importDefinition.getSource() instanceof Element);
}
项目:spring4-understanding    文件:CollectingReaderEventListener.java   
@Override
public void importProcessed(ImportDefinition importDefinition) {
    this.imports.add(importDefinition);
}
项目:class-guard    文件:CollectingReaderEventListener.java   
@Override
public void importProcessed(ImportDefinition importDefinition) {
    this.imports.add(importDefinition);
}
项目:geomajas-project-server    文件:LoggingContextLoader.java   
@Override
public void importProcessed(ImportDefinition importDefinition) {
    log.info("Processed import [" + importDefinition.getImportedResource() + "]");
}
项目:geomajas-project-server    文件:LoggingApplicationContext.java   
@Override
public void importProcessed(ImportDefinition importDefinition) {
    log.info("Processed import [" + importDefinition.getImportedResource() + "]");
}