开发者

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 gen开发者_开发百科eric 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?


no man its not possible

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜