org.springframework.contributions.ordered.OrderContributionUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-contributions Show documentation
Show all versions of spring-contributions Show documentation
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.
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