@Override public ChunkedInput readFrom(Class<ChunkedInput> chunkedInputClass, Type type, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> headers, InputStream inputStream) throws IOException, WebApplicationException { final Type chunkType = ReflectionHelper.getTypeArgument(type, 0); return new ChunkedInput( chunkType, inputStream, annotations, mediaType, headers, messageBodyWorkers.get(), propertiesDelegateProvider.get()); } }
@Override public ChunkedInput readFrom(Class<ChunkedInput> chunkedInputClass, Type type, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> headers, InputStream inputStream) throws IOException, WebApplicationException { final Type chunkType = ReflectionHelper.getTypeArgument(type, 0); return new ChunkedInput( chunkType, inputStream, annotations, mediaType, headers, messageBodyWorkers.get(), propertiesDelegateProvider.get()); } }
@Override public ChunkedInput readFrom(Class<ChunkedInput> chunkedInputClass, Type type, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> headers, InputStream inputStream) throws IOException, WebApplicationException { final Type chunkType = ReflectionHelper.getTypeArgument(type, 0); return new ChunkedInput( chunkType, inputStream, annotations, mediaType, headers, messageBodyWorkers.get(), propertiesDelegateProvider.get()); } }
@Override public Object resolve(Injectee injectee) { Injectee newInjectee = injectee; if (injectee.isFactory()) { newInjectee = getFactoryInjectee(injectee, ReflectionHelper.getTypeArgument(injectee.getRequiredType(), 0)); } Bean<?> bean = descriptorCache.apply(newInjectee.getRequiredType()); if (bean != null) { CreationalContext ctx = beanManager.get().createCreationalContext(bean); Object result = bean.create(ctx); if (injectee.isFactory()) { return (Supplier<Object>) () -> result; } else { return result; } } return null; }
targetGenericType = ReflectionHelper.getTypeArgument(genericType, 0); } else { targetGenericType = genericType;
targetGenericType = ReflectionHelper.getTypeArgument(genericType, 0); } else { targetGenericType = genericType;
@Override public Object resolve(Injectee injectee, ServiceHandle<?> root) { Type requiredType = injectee.getRequiredType(); boolean isHk2Factory = ReflectionHelper.isSubClassOf(requiredType, Factory.class); Injectee newInjectee; if (isHk2Factory) { newInjectee = getFactoryInjectee(injectee, ReflectionHelper.getTypeArgument(requiredType, 0)); } else { newInjectee = foreignRequestScopedInjecteeCache.apply(new CacheKey(injectee)); } ActiveDescriptor<?> ad = descriptorCache.apply(new CacheKey(newInjectee)); if (ad != null) { final ServiceHandle handle = serviceLocator.getServiceHandle(ad, newInjectee); if (isHk2Factory) { return asFactory(handle); } else { return handle.getService(); } } return null; }
@Override public Object resolve(Injectee injectee, ServiceHandle<?> root) { Type requiredType = injectee.getRequiredType(); boolean isHk2Factory = ReflectionHelper.isSubClassOf(requiredType, Factory.class); Injectee newInjectee; if (isHk2Factory) { newInjectee = getFactoryInjectee(injectee, ReflectionHelper.getTypeArgument(requiredType, 0)); } else { newInjectee = foreignRequestScopedInjecteeCache.apply(new CacheKey(injectee)); } ActiveDescriptor<?> ad = descriptorCache.apply(new CacheKey(newInjectee)); if (ad != null) { final ServiceHandle handle = serviceLocator.getServiceHandle(ad, newInjectee); if (isHk2Factory) { return asFactory(handle); } else { return handle.getService(); } } return null; }
targetGenericType = ReflectionHelper.getTypeArgument(genericType, 0); } else { targetGenericType = genericType;
@Override public ChunkedInput readFrom(Class<ChunkedInput> chunkedInputClass, Type type, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> headers, InputStream inputStream) throws IOException, WebApplicationException { final Type chunkType = ReflectionHelper.getTypeArgument(type, 0); return new ChunkedInput( chunkType, inputStream, annotations, mediaType, headers, messageBodyWorkers.get(), propertiesDelegateProvider.get()); } }
@Override public ChunkedInput readFrom(Class<ChunkedInput> chunkedInputClass, Type type, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> headers, InputStream inputStream) throws IOException, WebApplicationException { final Type chunkType = ReflectionHelper.getTypeArgument(type, 0); return new ChunkedInput( chunkType, inputStream, annotations, mediaType, headers, messageBodyWorkers.get(), propertiesDelegateProvider.get()); } }
@Override public ChunkedInput readFrom(Class<ChunkedInput> chunkedInputClass, Type type, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> headers, InputStream inputStream) throws IOException, WebApplicationException { final Type chunkType = ReflectionHelper.getTypeArgument(type, 0); return new ChunkedInput( chunkType, inputStream, annotations, mediaType, headers, messageBodyWorkers.get(), propertiesDelegateProvider.get()); } }
@Override public ChunkedInput readFrom(Class<ChunkedInput> chunkedInputClass, Type type, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> headers, InputStream inputStream) throws IOException, WebApplicationException { final Type chunkType = ReflectionHelper.getTypeArgument(type, 0); return new ChunkedInput( chunkType, inputStream, annotations, mediaType, headers, messageBodyWorkers.get(), propertiesDelegateProvider.get()); } }
targetGenericType = ReflectionHelper.getTypeArgument(genericType, 0); } else { targetGenericType = genericType;
targetGenericType = ReflectionHelper.getTypeArgument(genericType, 0); } else { targetGenericType = genericType;
@Override public Object resolve(Injectee injectee, ServiceHandle<?> root) { Type requiredType = injectee.getRequiredType(); boolean isHk2Factory = ReflectionHelper.isSubClassOf(requiredType, Factory.class); Injectee newInjectee; if (isHk2Factory) { newInjectee = getFactoryInjectee(injectee, ReflectionHelper.getTypeArgument(requiredType, 0)); } else { newInjectee = foreignRequestScopedInjecteeCache.compute(injectee); } ActiveDescriptor<?> ad = descriptorCache.compute(newInjectee); if (ad != null) { final ServiceHandle handle = serviceLocator.getServiceHandle(ad, newInjectee); if (isHk2Factory) { return asFactory(handle); } else { return handle.getService(); } } return null; }
@Override public Object resolve(Injectee injectee, ServiceHandle<?> root) { Type requiredType = injectee.getRequiredType(); boolean isHk2Factory = ReflectionHelper.isSubClassOf(requiredType, Factory.class); Injectee newInjectee; if (isHk2Factory) { newInjectee = getFactoryInjectee(injectee, ReflectionHelper.getTypeArgument(requiredType, 0)); } else { newInjectee = foreignRequestScopedInjecteeCache.compute(injectee); } ActiveDescriptor<?> ad = descriptorCache.compute(newInjectee); if (ad != null) { final ServiceHandle handle = serviceLocator.getServiceHandle(ad, newInjectee); if (isHk2Factory) { return asFactory(handle); } else { return handle.getService(); } } return null; }
@Override public Object resolve(Injectee injectee, ServiceHandle<?> root) { Type requiredType = injectee.getRequiredType(); boolean isHk2Factory = ReflectionHelper.isSubClassOf(requiredType, Factory.class); Injectee newInjectee; if (isHk2Factory) { newInjectee = getFactoryInjectee(injectee, ReflectionHelper.getTypeArgument(requiredType, 0)); } else { newInjectee = foreignRequestScopedInjecteeCache.compute(injectee); } ActiveDescriptor<?> ad = descriptorCache.compute(newInjectee); if (ad != null) { final ServiceHandle handle = serviceLocator.getServiceHandle(ad, newInjectee); if (isHk2Factory) { return asFactory(handle); } else { return handle.getService(); } } return null; }
@Override public Object resolve(Injectee injectee, ServiceHandle<?> root) { Type requiredType = injectee.getRequiredType(); boolean isHk2Factory = ReflectionHelper.isSubClassOf(requiredType, Factory.class); Injectee newInjectee; if (isHk2Factory) { newInjectee = getFactoryInjectee(injectee, ReflectionHelper.getTypeArgument(requiredType, 0)); } else { newInjectee = foreignRequestScopedInjecteeCache.apply(new CacheKey(injectee)); } ActiveDescriptor<?> ad = descriptorCache.apply(new CacheKey(newInjectee)); if (ad != null) { final ServiceHandle handle = serviceLocator.getServiceHandle(ad, newInjectee); if (isHk2Factory) { return asFactory(handle); } else { return handle.getService(); } } return null; }
@Override public Object resolve(Injectee injectee, ServiceHandle<?> root) { Type requiredType = injectee.getRequiredType(); boolean isHk2Factory = ReflectionHelper.isSubClassOf(requiredType, Factory.class); Injectee newInjectee; if (isHk2Factory) { newInjectee = getFactoryInjectee(injectee, ReflectionHelper.getTypeArgument(requiredType, 0)); } else { newInjectee = foreignRequestScopedInjecteeCache.apply(new CacheKey(injectee)); } ActiveDescriptor<?> ad = descriptorCache.apply(new CacheKey(newInjectee)); if (ad != null) { final ServiceHandle handle = serviceLocator.getServiceHandle(ad, newInjectee); if (isHk2Factory) { return asFactory(handle); } else { return handle.getService(); } } return null; }