0 Replies Latest reply on Nov 22, 2007 12:08 PM by Ales Justin

    TypeInfo.isAssignableFrom

    Ales Justin Master

      I just had a discussion with Flavia (JBossAOP), following up the discussion started by Heiko in TheCore regarding generic collection component type, whether something is assignable or not ...

      She informed me that she went an extra mile, and wrote the isAssignableFrom completely based on the Type (http://java.sun.com/j2se/1.5.0/docs/api/java/lang/reflect/Type.html) interface.

      Since this is a generic work, which definitely belongs to Container module, and not just to AOP, I guess we can change our TypeInfo.isAssignableFrom to her implementation:
      - https://svn.jboss.org/repos/jbossas/projects/aop/trunk/aop/src/main/org/jboss/aop/advice/annotation/assignability/

      As the stuff is far from trivial, a bunch of tests were also written:
      - https://svn.jboss.org/repos/jbossas/projects/aop/trunk/aop/src/test/org/jboss/test/aop/unit/assignability/

      If we also pitch in some sort of caching, this should nicely fit in into slowly removing the deprecated getType method.

      Thoughts?

      btw: great work Flavia!!