11 Replies Latest reply on Feb 14, 2005 6:35 PM by Adrian Brock

    INFO api - a critique

    Adrian Brock Master

      Here are my problems with the Info api as it currently stands.

      1) Need support for ParameterInfo, mainly for parameter annotations
      2) Ideally, I'd like to share the reflection objects (field, method, etc) with
      the reflection join point factory rather than having to re-resolve them.
      I couldn't see any easy way to achieve this.
      3) Need to properly define the TypoInfoFactory that will be exposed through
      the ClassAdapter and how somebody (e.g. the MicroContainer) goes about
      overriding the annotations. Clone and update?
      4) The use of arrays (although efficient when everything needs retrieving)
      is inefficient for (at least) the reflection based approach, where we only want
      to retrieve some information and leave markers about what can be retrieved
      later if required. Otherwise it is going to have create a reflection model of the
      entire class model upfront.
      5) All info classes should be serializable with serialVersionUIDs defined
      and implementation details like the cached hashCode transient.
      They should work even in circumstances where the class is not available
      by the remote user (which is why I'm not convinced my reflection based
      versions are correct)? This also speaks towards lazy loading rather
      than serializng a big tree of metadata.
      6) Need to implement toString() so we can see what is happening in
      TRACE logging.