@Nonnull
	@Override
	@SuppressWarnings("unchecked")
	public <T> T instance(@Nonnull Class<T> cls) throws AllocationException {
		try {
			// Create bean
			Bean<T> bean = (Bean<T>) classBeanMap.computeIfAbsent(cls, c -> {
				AnnotatedType<T> annotatedClass = beanManager.createAnnotatedType(cls);
				BeanAttributes<T> attributes = beanManager.createBeanAttributes(annotatedClass);
				InjectionTargetFactory<T> factory = beanManager.getInjectionTargetFactory(annotatedClass);
				return beanManager.createBean(attributes, cls, factory);
			});
			CreationalContext<T> creationalContext = beanManager.createCreationalContext(bean);

			// Allocate instance of bean
			return bean.create(creationalContext);
		} catch (Throwable t) {
			throw new AllocationException(cls, t);
		}
	}
Allocator instance that ties into the CDI container.

@author Matt Coley
recaf-core/src/main/java/software/coley/recaf/services/plugin/CdiClassAllocator.java