Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-279

Provide CDI SPI that could be used to directly replace java.lang.reflect methods for expanding the use of @Stereotype to Java EE 7 platform


    • Type: Feature Request
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: TBD
    • Component/s: None
    • Labels:


      Please provide CDI SPI that could be used to directly replace the java.lang.reflect methods when expanding the use of @Stereotype to Java EE 7 platform.

      Also attaching the relevant sections from Bill's @Stereotype proposal below:
      Stereotypes are implemented by CDI, but (typically) the Java EE deployment processing has no knowledge of CDI when it's looking for Java EE annotations. Integrating with CDI so that stereotypes could be considered during this deployment-time annotation processing would require a new CDI SPI.

      Many existing implementations would need to be changed to understand
      how to expand stereotypes. Requiring every technology to do this
      itself will almost certainly lead to inconsistencies. Since stereotypes
      are a CDI feature, CDI will provide a simple replacement for the
      java.lang.reflect methods such as getAnnotations that takes into
      account stereotypes.

      Some technologies will not want to have a hard dependency on CDI so
      we'll need to provide a simple way for them to conditionally invoke
      these new methods only if CDI is present, falling back to java.lang.reflect
      if not. This seems straightforward. In this case, the functionality of
      @Stereotype would not be available to applications that chose to run
      without CDI.

        Gliffy Diagrams




              • Assignee:
                pmuir Pete Muir
                hong.hz.zhang Hong Zhang
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: