users@codemodel.java.net

Re: method invoke with type parameter

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Fri, 10 Sep 2010 23:39:35 +0200

Hi,

> I try to generate that code:
>
>> Arrays.<Bar>asList( new BarA(), new BarB() ).
>
>
> The closest I get to:
>
> model.ref( Arrays.class ).staticInvoke( "asList" ).arg( expression
> ).arg( expression)...
>
> But I can't find a way to add the type parameter... Any hints?

Seems to be not possible at the moment. There should be probably
something like JInvocation.narrow(JClass...)
Please file an issue.

Bye.
/lexi