private Service metaService(Key<?> key) { for (Annotation ann : key.annotations()) { Service service = ann.annotationType().getAnnotation(Service.class); if (service != null) { return service; } } for (Class<?> annType : key.annotationTypes()) { Service service = annType.getAnnotation(Service.class); if (service != null) { return service; } } return null; }
static <T> InjectionPoint<T> of(Key<T> key) { return new InjectionPointImpl<>(key, key.type(), key.rawClass().getSimpleName(), key.annotations(), key.rawClass()); }