public void process(InjectingComponentType componentType, Class<?> implClass, IntrospectionContext context) { processService(componentType, implClass, context); processReferences(componentType, implClass, context); }
return; Class<?> serviceInterface = getService(annotation); if (serviceInterface.equals(Void.class)) { serviceInterface = null; Binding binding = processService(annotation, boundService, componentType, implClass, context); if (binding == null) { return; processHandlers(implClass, binding, implClass, context); boundService.addBinding(binding); Binding callbackBinding = processServiceCallback(annotation, boundService, componentType, implClass, context); if (callbackBinding != null) { boundService.addCallbackBinding(callbackBinding);
FieldInjectionSite fieldSite = (FieldInjectionSite) site; Field field = fieldSite.getField(); processBindingAnnotations(field, reference, implClass, context); } else if (site instanceof MethodInjectionSite) { MethodInjectionSite methodSite = (MethodInjectionSite) site; Method method = methodSite.getMethod(); processBindingAnnotations(method, reference, implClass, context); } else if (site instanceof ConstructorInjectionSite) { ConstructorInjectionSite constructorSite = (ConstructorInjectionSite) site; if (annotationType.equals(annotation.annotationType())) { A castAnnotation = annotationType.cast(annotation); Binding binding = processReference(castAnnotation, reference, implClass, context); if (binding == null) { continue; ServiceContract contract = reference.getServiceContract(); if (contract.getCallbackContract() != null) { Binding callbackBinding = processReferenceCallback(castAnnotation, reference, implClass, context); if (callbackBinding != null) { reference.addCallbackBinding(callbackBinding);
protected void processBindingAnnotations(AccessibleObject object, Reference reference, Class<?> implClass, IntrospectionContext context) { A annotations[] = object.getAnnotationsByType(annotationType); if (annotations.length == 0) { // check meta-annotations for (Annotation annotation : object.getAnnotations()) { annotations = annotation.annotationType().getAnnotationsByType(annotationType); if (annotations.length > 0) { break; } } if (annotations.length == 0) { return; } } for (A annotation : annotations) { Binding binding = processReference(annotation, reference, implClass, context); if (binding == null) { continue; } reference.addBinding(binding); ServiceContract contract = reference.getServiceContract(); if (contract.getCallbackContract() != null) { Binding callbackBinding = processReferenceCallback(annotationType.cast(annotation), reference, implClass, context); if (callbackBinding != null) { reference.addCallbackBinding(callbackBinding); } } } }
private void processHandlers(AnnotatedElement element, Binding binding, Class<?> implClass, IntrospectionContext context) { org.fabric3.api.annotation.model.BindingHandler annotation = element.getAnnotation(org.fabric3.api.annotation.model.BindingHandler.class); if (annotation == null) { return; } if (annotation.value().isEmpty()) { String[] values = annotation.handlers(); for (String value : values) { parseHandlerUri(value, element, binding, implClass, context, annotation); } } else { parseHandlerUri(annotation.value(), element, binding, implClass, context, annotation); } }