All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.springframework.contributions.ordered.OrderContributionUtils Maven / Gradle / Ivy

Go to download

This project adds a so called contribution mechanism (like known from Tapestry IOC or Eclipse Plugins) for configuration and extension of services to the Spring project.

There is a newer version: 2.0.0
Show newest version
package org.springframework.contributions.ordered;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;

/**
 * Utils for {@link OrderedContribution} bean definition.
 *
 * @author Christian Köberl
 */
final class OrderContributionUtils
{
    private OrderContributionUtils()
    {
    }

    public static BeanDefinition createContributionBeanDefinition(String beanName, Object beanValueOrReference,
                                                                  String constraints)
    {
        BeanDefinitionBuilder contributionBuilder = BeanDefinitionBuilder
            .genericBeanDefinition(OrderedContribution.class);
        contributionBuilder.addConstructorArgValue(beanName);
        contributionBuilder.addConstructorArgValue(beanValueOrReference);
        contributionBuilder.addConstructorArgValue(constraints);
        return contributionBuilder.getBeanDefinition();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy