Given the type:
public interface Foo<T, X extends A>{...}
I need to use programmatic lookup to find bean that implement the given interface regardless of parameter types. Because of type safe resolution this returns an empty set:
final Set<Bean<?>> foos= BeanManagerProvider.getInstance().getBeanManager().getBeans(Foo.class, new AnyLit());
or via Deltaspike:
org.apache.deltaspike.core.api.provider.BeanProvider.getDependent(Foo.class, new AnyLit())
where AnyLit is:
private static class AnyLit extends AnnotationLiteral<Any> implements Any
{
}
Is there any way to get around this?
Thanks