private void processTargets(org.fabric3.api.annotation.Producer annotation, Producer producer, AnnotatedElement element, Class<?> clazz, IntrospectionContext context) { try { if (annotation.targets().length > 0) { for (String target : annotation.targets()) { producer.addTarget(new URI(target)); } } else if (annotation.target().length() > 0) { producer.addTarget(new URI(annotation.target())); } } catch (URISyntaxException e) { InvalidAnnotation error = new InvalidAnnotation("Invalid producer target on : " + clazz.getName(), element, annotation, clazz, e); context.addError(error); } }