[jboss-user] [JBoss Microcontainer Development] - JBREFLECT-5 - Implementing generics in JavassistClassInfo

Kabir Khan do-not-reply at jboss.com
Fri Apr 30 10:14:32 EDT 2010


Kabir Khan [http://community.jboss.org/people/kabir.khan%40jboss.com] replied to the discussion

"JBREFLECT-5 - Implementing generics in JavassistClassInfo"

To view the discussion, visit: http://community.jboss.org/message/540441#540441

--------------------------------------------------------------
> Kabir Khan wrote:
> 
> Removing the cache for parameterized types largely works, although I need to fix some StackOverflowErrors when using recursive bound type variables such as
> 
> *public* *class* ClassInfoTypeVariableRecursiveBounded<T *extends* ClassInfoTypeVariableRecursiveBounded<T>>
> {
> *public* T genericTypeVariableRecursiveBounded(T param, String s)
>    {
> *return* *null*;
>    }
> 
> }
> 
This has been fixed. I needed to add this method to ClassInfo
   /**
    * Gets the type variable if we are a parameterized type which is part of a 
    * parameterized type and there is a type variable for this type. This is
    * useful in avoiding infinite recursion
    * 
    * @return the type variable
    */
   String getTypeVariable();

 

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/540441#540441]

Start a new discussion in JBoss Microcontainer Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2115]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100430/e900e19a/attachment.html 


More information about the jboss-user mailing list