org.springframework.beans.factory.parsing.AliasDefinition Java Examples
The following examples show how to use
org.springframework.beans.factory.parsing.AliasDefinition.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EventPublicationTests.java From spring-analysis-note with MIT License | 5 votes |
@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); }
Example #2
Source File: CollectingReaderEventListener.java From spring-analysis-note with MIT License | 5 votes |
@Override public void aliasRegistered(AliasDefinition aliasDefinition) { List<AliasDefinition> aliases = this.aliasMap.get(aliasDefinition.getBeanName()); if (aliases == null) { aliases = new ArrayList<>(); this.aliasMap.put(aliasDefinition.getBeanName(), aliases); } aliases.add(aliasDefinition); }
Example #3
Source File: EventPublicationTests.java From java-technology-stack with MIT License | 5 votes |
@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); }
Example #4
Source File: CollectingReaderEventListener.java From java-technology-stack with MIT License | 5 votes |
@Override public void aliasRegistered(AliasDefinition aliasDefinition) { List<AliasDefinition> aliases = this.aliasMap.get(aliasDefinition.getBeanName()); if (aliases == null) { aliases = new ArrayList<>(); this.aliasMap.put(aliasDefinition.getBeanName(), aliases); } aliases.add(aliasDefinition); }
Example #5
Source File: EventPublicationTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@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); }
Example #6
Source File: CollectingReaderEventListener.java From spring-analysis-note with MIT License | 4 votes |
public List<AliasDefinition> getAliases(String beanName) { List<AliasDefinition> aliases = this.aliasMap.get(beanName); return (aliases != null ? Collections.unmodifiableList(aliases) : null); }
Example #7
Source File: CollectingReaderEventListener.java From java-technology-stack with MIT License | 4 votes |
public List<AliasDefinition> getAliases(String beanName) { List<AliasDefinition> aliases = this.aliasMap.get(beanName); return (aliases != null ? Collections.unmodifiableList(aliases) : null); }
Example #8
Source File: ContextDependencyLister.java From alfresco-repository with GNU Lesser General Public License v3.0 | 4 votes |
public void aliasRegistered(AliasDefinition alias) { if(! aliases.containsKey(alias.getAlias())) { aliases.put(alias.getAlias(), alias.getBeanName()); } }
Example #9
Source File: LoggingContextLoader.java From geomajas-project-server with GNU Affero General Public License v3.0 | 4 votes |
@Override public void aliasRegistered(AliasDefinition aliasDefinition) { log.info("Registered alias [" + aliasDefinition.getAlias() + "] for bean " + aliasDefinition.getBeanName()); }
Example #10
Source File: LoggingApplicationContext.java From geomajas-project-server with GNU Affero General Public License v3.0 | 4 votes |
@Override public void aliasRegistered(AliasDefinition aliasDefinition) { log.info("Registered alias [" + aliasDefinition.getAlias() + "] for bean " + aliasDefinition.getBeanName()); }