Community

JBREFLECT-5 - Implementing generics in JavassistClassInfo

reply from Kabir Khan in JBoss Microcontainer Development - View the full discussion

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

Start a new discussion in JBoss Microcontainer Development at Community