[jboss-user] [JBoss Microcontainer Development] New message: "Re: JBREFLECT-5 - Implementing generics in JavassistClassInfo"

Kabir Khan do-not-reply at jboss.com
Wed Mar 10 12:53:33 EST 2010


User development,

A new message was posted in the thread "JBREFLECT-5 - Implementing generics in JavassistClassInfo":

http://community.jboss.org/message/531173#531173

Author  : Kabir Khan
Profile : http://community.jboss.org/people/kabir.khan@jboss.com

Message:
--------------------------------------------------------------
1) and 4) have been done.>  
> A few points worth remembering:
> a) I have implemented a JavassistParameterizedClassInfo (stolen from the introspection implementation) which handles things like Collection<String>. This basically delegates to the "raw" ClassInfo for Collection, augmented with extra information regarding the <String> bit. These are currently not cached and are created on every access.
>  
>  
>  
>  
I have not added caching yet, and adding this simple test passes with the introspection implementation, but fails with the Javassist implementation
 
   public Comparable<String> signatureCachedParameterizedClassInfo()
   {
      return null;
   }
   
   public void testCachedParameterizedClassInfo() throws Throwable
   {
      Type type = getGenericReturnType("signatureCachedParameterizedClassInfo");
      TypeInfo typeInfo1 = getTypeInfoFactory().getTypeInfo(type);
      TypeInfo typeInfo2 = getTypeInfoFactory().getTypeInfo(getGenericReturnType("signatureCachedParameterizedClassInfo"));
      assertEquals(typeInfo1, typeInfo2);
      assertSame(typeInfo1, typeInfo2);  // <-- FAILS
 
      //Also check the results of repeated calls to getGenericSuperClass/-Interfaces() etc.
   }
 
 

 
Is this object equality a requirement? My fear is that working out the key will be costly
 
> A few points worth remembering:
> b) JavassistClassInfo should cache the values of isMap() and isCollection()
>  
>  
>  
>  
This has been done.

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

To reply to this message visit the message page: http://community.jboss.org/message/531173#531173




More information about the jboss-user mailing list