Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can generic types be used as the "type" of a composite component's attribute tag?

It looks to me like composite components' attributes don't allow generic types. Here's a simple test case:

<cc:attribute name="stringList" type="java.util.List&lt;java.lang.String&gt;" />

The error I get is,

java.lang.ClassNotFoundException: java.util.List<java.lang.String>

(If I replace the &lt; and &gt; with < and >, I get a error because that's not valid XHTML.)

I know that the generic part of the type will be erased at runtime, but I was hoping to use generics here just for clarity of reading the code. Is that possible?

like image 724
Nick Avatar asked Nov 04 '10 20:11

Nick


1 Answers

no man its not possible

like image 69
mkoryak Avatar answered Sep 28 '22 23:09

mkoryak