Spring Framework RuntimeBeanReference - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework RuntimeBeanReference class.

This code example shows how to use the following methods:
		} 
		else { 
			String beanName = element.getAttribute("ref");
			Assert.isTrue(StringUtils.hasText(beanName),
					"Either a 'ref' attribute pointing to a Converter or a <bean> sub-element defining a Converter is required."); 
			INTEGRATION_CONVERTER_INITIALIZER.registerConverter(registry, new RuntimeBeanReference(beanName));
		} 
		return null; 
	} 
 
} 
6
CodeRank
This code example shows how to use the following methods:
This code example shows how to use the following methods:
This code example shows how to use the following methods:
     *                construct the {@link org.springframework.beans.factory.config.BeanDefinition}. 
     */ 
    private void parseLockingStrategy(Element element, GenericBeanDefinition builder) {
        if (element.hasAttribute(LOCK_MANAGER_ATTRIBUTE)) {
            String lockManager = element.getAttribute(LOCK_MANAGER_ATTRIBUTE);
            builder.getConstructorArgumentValues().addIndexedArgumentValue(2, new RuntimeBeanReference(lockManager));
        } else if (element.hasAttribute(LOCKING_STRATEGY_ATTRIBUTE)) {
            LockingStrategy strategy = LockingStrategy.valueOf(element.getAttribute(LOCKING_STRATEGY_ATTRIBUTE));
            GenericBeanDefinition lockManager = new GenericBeanDefinition();
            lockManager.setBeanClass(strategy.getLockManagerType());
            builder.getConstructorArgumentValues().addIndexedArgumentValue(2, lockManager);
        } 
    } 
 
    /** 
     * Parse the {@link org.axonframework.domain.AggregateRoot} type information and make it a constructor argument. 
     * 
     * @param element  The {@link org.w3c.dom.Element} being parsed. 
     * @param builder  The {@link org.springframework.beans.factory.support.BeanDefinitionBuilder} being used to 
     *                 construct the {@link org.springframework.beans.factory.config.BeanDefinition}. 
6
CodeRank
This code example shows how to use the following methods:
public class GlobalWireTapParser extends GlobalChannelInterceptorParser { 
 
	@Override 
	protected Object getBeanDefinitionBuilderConstructorValue(Element element, ParserContext parserContext) { 
		String wireTapBeanName = new WireTapParser().parse(element, parserContext); 
		return new RuntimeBeanReference(wireTapBeanName); 
	} 
 
} 
6
CodeRank
This code example shows how to use the following methods:
	} 
 
	@Test
	public void runtimeBeanReference() { 
		RuntimeBeanReference master = new RuntimeBeanReference("name");
		RuntimeBeanReference equal = new RuntimeBeanReference("name");
		RuntimeBeanReference notEqual = new RuntimeBeanReference("someOtherName");
		RuntimeBeanReference subclass = new RuntimeBeanReference("name") {
		}; 
		assertEqualsAndHashCodeContracts(master, equal, notEqual, subclass);
	} 
 
	private void setBaseProperties(AbstractBeanDefinition definition) {
		definition.setAbstract(true);
		definition.setAttribute("foo", "bar");
		definition.setAutowireCandidate(false);
		definition.setAutowireMode(AbstractBeanDefinition.AUTOWIRE_BY_TYPE);
		// definition.getConstructorArgumentValues().addGenericArgumentValue("foo"); 
		definition.setDependencyCheck(AbstractBeanDefinition.DEPENDENCY_CHECK_OBJECTS);
		definition.setDependsOn(new String[] { "foo", "bar" });
5
CodeRank
This code example shows how to use the following methods:
This code example shows how to use the following methods:
This code example shows how to use the following methods:
This code example shows how to use the following methods:
See Code Examples for Spring Framework RuntimeBeanReference Methods: