private BeanClassSelector resolveBeanClassSelector(JClassType type) {
if (type.isAnnotationPresent(PatternBasedBeanSelector.class)) {
return new PatternBasedSelector(type.getAnnotation(PatternBasedBeanSelector.class));
}
if (type.isAnnotationPresent(AnnotationBasedBeanSelector.class)) {
return new AnnotationBasedSelector(type.getAnnotation(AnnotationBasedBeanSelector.class));
}
// fallback on annotation based with default annotation (@Bean)
return new DefaultSelector();
}