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

Enrich AnnotatedParameter to get access to parameter name

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Obsolete
    • Major
    • None
    • None
    • Portable Extensions
    • None

    Description

      With JEP 118 (Access to Parameter Names at Runtime) introduced in Java 8, the CDI SPI could be enriched so that AnnotatedParameter provide access to parameter names of methods and constructors.

      In addition to class and method names that are used for default naming convention in producer methods that rely on InjectionPoint metadata, parameter name could be used as well to implement default convention for method parameter injection point.

      One example of such a pattern is implemented in the Metrics CDI extension and that would avoid to rely on the Java API: https://github.com/astefanutti/metrics-cdi/blob/master/impl/src/main/java/io/astefanutti/metrics/cdi/MetricProducer.java#L126.

      That is something Spring 4 now provides with SPR-9643.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              astefanu@redhat.com Antonin Stefanutti
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: