List of usage examples for org.springframework.beans.factory.annotation AnnotatedBeanDefinition setPrimary
void setPrimary(boolean primary);
From source file:org.rosenvold.spring.convention.ConventionBeanFactory.java
static void processCommonDefinitionAnnotations(AnnotatedBeanDefinition abd) { if (abd.getMetadata().isAnnotated(Primary.class.getName())) { abd.setPrimary(true); }/*from w ww .j av a2 s. com*/ if (abd.getMetadata().isAnnotated(Lazy.class.getName())) { Boolean value = (Boolean) abd.getMetadata().getAnnotationAttributes(Lazy.class.getName()).get("value"); abd.setLazyInit(value); } if (abd.getMetadata().isAnnotated(DependsOn.class.getName())) { String[] value = (String[]) abd.getMetadata().getAnnotationAttributes(DependsOn.class.getName()) .get("value"); abd.setDependsOn(value); } }