private void addEndpointProperties(Endpoint ep, Bus bus, EndpointProperty ... annotations) { for (EndpointProperty prop : annotations) { if (prop == null) { continue; } String ref = prop.ref(); Class<?> cls = prop.beanClass(); Object obj = null; String[] s = prop.value(); if (!StringUtils.isEmpty(ref)) { obj = bus.getExtension(ConfiguredBeanLocator.class).getBeanOfType(ref, cls); } else if (s.length == 0 && cls != Object.class) { obj = createObject(cls, ep, bus); } else if (s.length == 1) { obj = s[0]; } else { obj = s; } ep.getEndpointInfo().setProperty(prop.key(), obj); } }
private void addEndpointProperties(Endpoint ep, Bus bus, EndpointProperty ... annotations) { for (EndpointProperty prop : annotations) { if (prop == null) { continue; } String ref = prop.ref(); Class<?> cls = prop.beanClass(); Object obj = null; String s[] = prop.value(); if (!StringUtils.isEmpty(ref)) { obj = bus.getExtension(ConfiguredBeanLocator.class).getBeanOfType(ref, cls); } else if (s.length == 0 && cls != Object.class) { obj = createObject(cls, ep, bus); } else if (s.length == 1) { obj = s[0]; } else { obj = s; } ep.getEndpointInfo().setProperty(prop.key(), obj); } }
private void addEndpointProperties(Endpoint ep, Bus bus, EndpointProperty ... annotations) { for (EndpointProperty prop : annotations) { if (prop == null) { continue; } String ref = prop.ref(); Class<?> cls = prop.beanClass(); Object obj = null; String[] s = prop.value(); if (!StringUtils.isEmpty(ref)) { obj = bus.getExtension(ConfiguredBeanLocator.class).getBeanOfType(ref, cls); } else if (s.length == 0 && cls != Object.class) { obj = createObject(cls, ep, bus); } else if (s.length == 1) { obj = s[0]; } else { obj = s; } ep.getEndpointInfo().setProperty(prop.key(), obj); } }
private void addEndpointProperties(Endpoint ep, Bus bus, EndpointProperty ... annotations) { for (EndpointProperty prop : annotations) { if (prop == null) { continue; } String ref = prop.ref(); Class<?> cls = prop.beanClass(); Object obj = null; String s[] = prop.value(); if (!StringUtils.isEmpty(ref)) { obj = bus.getExtension(ConfiguredBeanLocator.class).getBeanOfType(ref, cls); } else if (s.length == 0 && cls != Object.class) { obj = createObject(cls, ep, bus); } else if (s.length == 1) { obj = s[0]; } else { obj = s; } ep.getEndpointInfo().setProperty(prop.key(), obj); } }