[cdi-dev] Clarification for manually resolving 'Instance'

Arne Limburg arne.limburg at openknowledge.de
Sun Sep 25 16:11:09 EDT 2011


wouldn't be so hard to specify that beanManager.getBeans(Instance.class); is the same as 
beanManager.getBeans(new TypeLiteral<Instance<Object>>() {}.getType());


Arne Limburg - Enterprise Architekt
open knowledge GmbH, Oldenburg
Bismarckstraße 13, 26122 Oldenburg
Mobil: +49 (0) 151 108 22 942
Tel: +49 (0) 441 - 4082-0
Fax: +49 (0) 441 - 4082-111
arne.limburg at openknowledge.de

Registergericht: Amtsgericht Oldenburg, HRB 4670
Geschäftsführer: Lars Röwekamp, Jens Schumann

-----Ursprüngliche Nachricht-----
Von: cdi-dev-bounces at lists.jboss.org [mailto:cdi-dev-bounces at lists.jboss.org] Im Auftrag von Pete Muir
Gesendet: Sonntag, 25. September 2011 22:08
An: Mark Struberg
Cc: cdi-dev at lists.jboss.org
Betreff: Re: [cdi-dev] Clarification for manually resolving 'Instance'

On 25 Sep 2011, at 21:06, Mark Struberg wrote:

>> The parameterized type resolution rules are correct, it's just there 
>> is no raw type of Instance to resolve.
> Yes, I think too, but was not sure if everyone do see it that way.

Ok, so until I actually see someone make a specific comment, I think we can leave this alone :-)

>> Should there be? Not sure if it would just be more confusing?
> I already saw the usage of Instance.class without the TypeLiteral (which is pretty well hidden in the specs).
> And people wondered why that doesn't work ...

Ok, file an issue, we can think about how to improve this.
cdi-dev mailing list
cdi-dev at lists.jboss.org

More information about the cdi-dev mailing list