JBoss development,
A new message was posted in the thread "JBREFLECT-5 - Implementing generics in
JavassistClassInfo":
http://community.jboss.org/message/529601#529601
Author : Kabir Khan
Profile :
http://community.jboss.org/people/kabir.khan@jboss.com
Message:
--------------------------------------------------------------
alesj wrote:
1) It should be easy to add some tests for this, right?
Perhaps we use some on-the-fly generics creation (which Javassist has, afaik), and test
this for some reasonable depth.
Yes
alesj wrote:
3) How do you get the generic Type then?
Not sure I understand the question. I've just worked with what was provided,
but we need some tests testing the scenario I outlined. We would need to check the
Signature attribute of the method and then construct the parameterized ClassInfo as was
done for getGenericSuperClass().
alesj wrote:
4) What are the issues / pitfalls here?
The main thing is knowing the index of the
type parameter we are looking for in the parent class, then getting the type argument
using that index used when extending that class and matching that up with the type
parameters of the child class. This needs doing for the whole hierarchy. This has been
done, but needs some better tests
alesj wrote:
Like I said, while implementing this, other depending projects are the best test env.
e.g. Kernel, CL, Deployers and of course the whole AS
*
-Dorg.jboss.reflect.spi.TypeInfoFactory=org.jboss.reflect.plugins.javassist.JavassistTypeInfoFactory
I'll try that
--------------------------------------------------------------
To reply to this message visit the message page:
http://community.jboss.org/message/529601#529601