deltaspike-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pete Muir <pm...@redhat.com>
Subject BeanProvider and parameterized types
Date Fri, 21 Dec 2012 13:54:56 GMT
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