public OSGiServiceBean(InjectionPoint injectionPoint, BundleContext ctx) { logger.trace("Entering OSGiServiceBean : " + "OSGiServiceBean() with parameter {}", new Object[] {injectionPoint}); this.injectionPoint = injectionPoint; this.ctx = ctx; type = injectionPoint.getType(); qualifiers = injectionPoint.getQualifiers(); filter = FilterGenerator.makeFilter(injectionPoint); for (Annotation annotation : injectionPoint.getQualifiers()) { if (annotation.annotationType().equals(OSGiService.class)) { timeout = ((OSGiService) annotation).value(); break; } } logger.debug("New OSGiServiceBean constructed {}", this); }
public OSGiServiceAnnotatedField(final AnnotatedField<? super T> field) { logger.debug("Creation of a new CDIOSGiAnnotatedField wrapping {}", field); this.field = field; filter = FilterGenerator.makeFilter(filter, field.getAnnotations()); annotations.add(filter); //annotations.add(new AnnotationLiteral<OSGiService>() {}); annotations.add(new OSGiServiceAnnotation( field.getJavaMember().getAnnotation(OSGiService.class).value())); if (field.getAnnotation(Required.class) != null) { annotations.add(new AnnotationLiteral<Required>() { }); } for (Annotation annotation : field.getAnnotations()) { if (!annotation.annotationType().isAnnotationPresent(Qualifier.class)) { annotations.add(annotation); } } logger.debug("New OSGiServiceAnnotatedField constructed {}", this); }
public OSGiServiceAnnotatedParameter(AnnotatedParameter parameter) { logger.trace("Entering OSGiServiceAnnotatedParameter : " + "OSGiServiceAnnotatedParameter() with parameter {}", new Object[] {parameter}); this.parameter = parameter; filter = FilterGenerator.makeFilter(parameter.getAnnotations()); annotations.add(filter); //annotations.add(new AnnotationLiteral<OSGiService>() {}); annotations.add(new OSGiServiceAnnotation( parameter.getAnnotation(OSGiService.class).value())); if (parameter.getAnnotation(Required.class) != null) { annotations.add(new AnnotationLiteral<Required>() { }); } for (Annotation annotation : parameter.getAnnotations()) { if (!annotation.annotationType().isAnnotationPresent(Qualifier.class)) { annotations.add(annotation); } } logger.debug("New OSGiServiceAnnotatedParameter constructed {}", this); }