// create a bean if there is a default public no-arg constructor
if (ObjectHelper.hasDefaultPublicNoArgConstructor(beanType)) {
instance = camelContext.getInjector().newInstance(beanType);
holder = new ConstantBeanHolder(instance, camelContext);
} else {
holder = new ConstantStaticTypeBeanHolder(beanType, camelContext);
}
} else if (instance != null) {
holder = new ConstantBeanHolder(instance, camelContext);
} else {
String ref = beanName();