deltaspike-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Struberg <strub...@yahoo.de>
Subject Re: BeanProvider and parameterized types
Date Fri, 21 Dec 2012 15:08:39 GMT
Hi Pete!

You are right, we could move this from Class. 
Can you commit it plz?

LieGrue,
strub




----- Original Message -----
> From: Pete Muir <pmuir@redhat.com>
> To: deltaspike-dev@incubator.apache.org
> Cc: 
> Sent: Friday, December 21, 2012 2:54 PM
> Subject: BeanProvider and parameterized types
> 
> Hi
> 
> I'm struggling to use BeanProvider to get a reference to a bean with a 
> parameterized type.
> 
> I tried:
> 
> Type type = new TypeLiteral<Event<ExceptionToCatchEvent>>() {
> 
>         private static final long serialVersionUID = -1563354351612225196L;
>     }.getType();
> Event<ExceptionToCatch> evt = BeanProvider.getContextualReference(type);
> 
> But there is no constructor for types, just for classes.
> 
> Are we missing a method (set) here? Or is it recommended to somehow convert that 
> Type into a class (AIUI it can't be always done).
> 

Mime
View raw message