deltaspike-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pete Muir <>
Subject BeanProvider and parameterized types
Date Fri, 21 Dec 2012 13:54:56 GMT

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;
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).
View raw message