<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" 
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<chapter id="reflection">
  <title>Reflection Model</title>

  <para>WARNING: The reflection model is subject to change without notice. It
  is currently under developement as issues with AOP integration and using the
  Microcontainer in more constrained environments are investigated.</para>

  <para>The reflection model provides an abstraction over java.lang.reflect.
  It exists in the container module in package org.jboss.reflect.</para>

  <section>
    <title>Aims</title>

    <section>
      <title>Cache</title>

      <para>Reflection can be a bottleneck unless the information is cached.
      This package provides a single stop cache for reflection data rather
      than repeating this behaviour throughout JBoss.</para>
    </section>

    <section>
      <title>Abstraction</title>

      <para>It is anticapted that the reflection model can be improved in
      different circumstances or environments. This module aims to be the one
      place where those issues are resolved.</para>
    </section>

    <section>
      <title>Hide implementation</title>

      <para>Under AOP, classes can change their characteristics usually
      through some sort of bytecode manipulation. This module aims to "hide"
      some of these details from routines that "don't care" about these
      implementation details.</para>
    </section>
  </section>

  <section>
    <title>Issues</title>

    <section>
      <title>Java5</title>

      <para>Complete the support for annotations and generics.</para>
    </section>

    <section>
      <title>Lazy Cache</title>

      <para>Improve the lazy cache implementation. Details should only be
      retrieved when accessed.</para>
    </section>

    <section>
      <title>AOP</title>

      <para>It is still an open issue whether this implementation can be used
      by AOP or whether the ClassAdapter is a better place.</para>
    </section>

    <section>
      <title>Javassist</title>

      <para>The current implementation just uses simple reflection. Javassist
      can proably provide a better implementation including supporting
      annotations before java5?</para>
    </section>
  </section>
</chapter>
