Spring Framework BeanDefinitionBuilder - 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 BeanDefinitionBuilder class.

This code example shows how to use the following methods:addPropertyReference, addPropertyValue, setRole
8
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:addPropertyReference, addPropertyValue, setRole
 
	@Override 
	protected void doParse(Element element, BeanDefinitionBuilder builder) {
 
		super.doParse(element, builder);
		builder.addPropertyValue("ignoreInvalidKeys",
				Boolean.valueOf(element.getAttribute("ignore-unresolvable")));
 
	} 
 
} 

8
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:addConstructorArgValue, addDependsOn, getRawBeanDefinition
        public BeanDefinitionBuilder getBuilder() {
            return this.builder;
        } 
 
        public void handle(Element element) {
            handleCommonBeanAttributes(element, builder, parserContext);
            final NamedNodeMap attrs = element.getAttributes();
            if (attrs != null) {
                Node instanceRefNode = attrs.getNamedItem("instance-ref");
                if (instanceRefNode == null) {
                    throw new IllegalStateException("'instance-ref' attribute is required for creating"
                            + " Hazelcast " + type);
                } 
                final String instanceRef = getTextContent(instanceRefNode);
                builder.getRawBeanDefinition().setFactoryBeanName(instanceRef);
                builder.addDependsOn(instanceRef);
 
                Node nameNode = attrs.getNamedItem("name");
                if (nameNode == null) {
                    nameNode = attrs.getNamedItem("id");

7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:addPropertyValue, getRawBeanDefinition
This code example shows how to use the following methods:addPropertyValue, getRawBeanDefinition
This code example shows how to use the following methods:addPropertyReference, addPropertyValue, setRole
		// As of Spring 3.1, the default value of system-properties-mode has changed from 
		// 'FALLBACK' to 'ENVIRONMENT'. This latter value indicates that resolution of 
		// placeholders against system properties is a function of the Environment and 
		// its current set of PropertySources 
		if (element.getAttribute(SYSTEM_PROPERTIES_MODE_ATTRIB).equals(SYSTEM_PROPERTIES_MODE_DEFAULT)) {
			return PropertySourcesPlaceholderConfigurer.class;
		} 
 
		// the user has explicitly specified a value for system-properties-mode. Revert 
		// to PropertyPlaceholderConfigurer to ensure backward compatibility. 
		return PropertyPlaceholderConfigurer.class;
	} 
 
	@Override 
	protected void doParse(Element element, BeanDefinitionBuilder builder) {
		super.doParse(element, builder);
 
		builder.addPropertyValue("ignoreUnresolvablePlaceholders",
				Boolean.valueOf(element.getAttribute("ignore-unresolvable")));
 

7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:addPropertyValue
		return Base64EncodedCiphererImpl.class; 
	} 
 
	@Override 
	protected void doParse(Element element, BeanDefinitionBuilder bean) {
		bean.addPropertyValue("keyAlgorithm", element.getAttribute("keyAlgorithm"));
		bean.addPropertyValue("cipherAlgorithm", element.getAttribute("cipherAlgorithm"));
		bean.addPropertyValue("mode", element.getAttribute("mode"));
		bean.addPropertyValue("chunkOutput", element.getAttribute("chunkOutput"));
		bean.addPropertyValue("charsetName", element.getAttribute("charset"));
		bean.addPropertyValue("provider", element.getAttribute("provider"));
	} 
 
} 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:addPropertyValue
public abstract class AbstractValidatorDefinitionParser<V extends AbstractValidator> extends 
                                                                                     AbstractSingleBeanDefinitionParser<V> { 
    @Override 
    protected final void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
        // parse id 
        attributesToProperties(element, builder, "id");
 
        // parse message 
        String message = trimToNull(element.getAttribute("message"));
 
        if (message == null) {
            message = trimToNull(element.getTextContent());
        } 
 
        if (message != null) {
            builder.addPropertyValue("message", message);
        } 
 
        // attributes 
        doParseAttributes(element, parserContext, builder);

7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:addConstructorArgValue, addPropertyValue, getBeanDefinition
    } 
 
    @Override 
    protected void parse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
        Preconditions.checkArgument(element.hasAttribute("path"));
        builder.addConstructorArgValue(element.getAttribute("path"));
 
        if(element.hasAttribute("delimeter")) {
            builder.addPropertyValue("delimeter", element.getAttribute("delimeter"));
        } 
        List childes =  parseCustomListElement(element, parserContext, builder.getBeanDefinition());
        if(childes!= null && childes.size() > 0) {
            builder.addPropertyValue("objectCreator", childes.get(0));
        } 
    } 
} 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:addConstructorArgValue
 * @author Michael Zhou 
 */ 
public abstract class AbstractConfigurationDefinitionParser<T> extends AbstractNamedBeanDefinitionParser<T> { 
    @Override 
    protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
        parseBeanDefinitionAttributes(element, parserContext, builder);
 
        String parentRef = trimToNull(element.getAttribute("parentRef"));
 
        if (parentRef != null) {
            builder.addConstructorArgValue(new RuntimeBeanReference(parentRef, true));
        } 
 
        subElementsToProperties(element, builder, and(sameNs(element), getPropertyElementSelector()));
 
        registerProductionModeSensiblePostProcessorIfNecessary(parserContext.getRegistry());
    } 
 
    protected ElementSelector getPropertyElementSelector() { 
        return any(); 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Spring Framework BeanDefinitionBuilder Methods: