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

Enrich AnnotatedParameter to get access to parameter name

XMLWordPrintable

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

      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.

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

                Created:
                Updated:
                Resolved: