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

项目:spring4-understanding    文件:EventPublicationTests.java   
@Test
public void aliasEventReceived() throws Exception {
    List aliases = this.eventListener.getAliases("testBean");
    assertEquals(2, aliases.size());
    AliasDefinition aliasDefinition1 = (AliasDefinition) aliases.get(0);
    assertEquals("testBeanAlias1", aliasDefinition1.getAlias());
    assertTrue(aliasDefinition1.getSource() instanceof Element);
    AliasDefinition aliasDefinition2 = (AliasDefinition) aliases.get(1);
    assertEquals("testBeanAlias2", aliasDefinition2.getAlias());
    assertTrue(aliasDefinition2.getSource() instanceof Element);
}
项目:spring4-understanding    文件:CollectingReaderEventListener.java   
@Override
public void aliasRegistered(AliasDefinition aliasDefinition) {
    List aliases = (List) this.aliasMap.get(aliasDefinition.getBeanName());
    if(aliases == null) {
        aliases = new ArrayList();
        this.aliasMap.put(aliasDefinition.getBeanName(), aliases);
    }
    aliases.add(aliasDefinition);
}
项目:class-guard    文件:EventPublicationTests.java   
public void testAliasEventReceived() throws Exception {
    List aliases = this.eventListener.getAliases("testBean");
    assertEquals(2, aliases.size());
    AliasDefinition aliasDefinition1 = (AliasDefinition) aliases.get(0);
    assertEquals("testBeanAlias1", aliasDefinition1.getAlias());
    assertTrue(aliasDefinition1.getSource() instanceof Element);
    AliasDefinition aliasDefinition2 = (AliasDefinition) aliases.get(1);
    assertEquals("testBeanAlias2", aliasDefinition2.getAlias());
    assertTrue(aliasDefinition2.getSource() instanceof Element);
}
项目:class-guard    文件:CollectingReaderEventListener.java   
@Override
public void aliasRegistered(AliasDefinition aliasDefinition) {
    List aliases = (List) this.aliasMap.get(aliasDefinition.getBeanName());
    if(aliases == null) {
        aliases = new ArrayList();
        this.aliasMap.put(aliasDefinition.getBeanName(), aliases);
    }
    aliases.add(aliasDefinition);
}
项目:alfresco-repository    文件:ContextDependencyLister.java   
public void aliasRegistered(AliasDefinition alias) {
   if(! aliases.containsKey(alias.getAlias())) {
      aliases.put(alias.getAlias(), alias.getBeanName());
   }
}
项目:community-edition-old    文件:ContextDependencyLister.java   
public void aliasRegistered(AliasDefinition alias) {
   if(! aliases.containsKey(alias.getAlias())) {
      aliases.put(alias.getAlias(), alias.getBeanName());
   }
}
项目:geomajas-project-server    文件:LoggingContextLoader.java   
@Override
public void aliasRegistered(AliasDefinition aliasDefinition) {
    log.info("Registered alias [" + aliasDefinition.getAlias() + "] for bean " + aliasDefinition.getBeanName());
}
项目:geomajas-project-server    文件:LoggingApplicationContext.java   
@Override
public void aliasRegistered(AliasDefinition aliasDefinition) {
    log.info("Registered alias [" + aliasDefinition.getAlias() + "] for bean " + aliasDefinition.getBeanName());
}