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

Review all read methods at configurators

    XMLWordPrintable

    Details

    • Type: Clarification
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.0-EDR2
    • Fix Version/s: 2.0 .Final
    • Component/s: None
    • Labels:
      None

      Description

      Currently there are several read methods used to initialize given configurator. These methods are at:

      • BeanConfigurator
      • InjectionPointConfigurator
      • ObserverMethodConfigurator

      I think we should review all of them. I don't understand to usage or let say additional value of the following ones:

      • ObserverMethodConfigurator#read(javax.enterprise.inject.spi.ObserverMethod<T>)

      This allows you to add new observer method based on exsiting one. Although when you want to define some observed type (of this new method) you need to specify subtype of the original type or you will end up with ClassCastException.
      Then there are those at InjectionPointConfigurator which appears to me completely useless:

      • InjectionPointConfigurator#read(java.lang.reflect.Field)
      • InjectionPointConfigurator#read(java.lang.reflect.Parameter)
      • InjectionPointConfigurator#read(javax.enterprise.inject.spi.AnnotatedField<?>)
      • InjectionPointConfigurator#read(javax.enterprise.inject.spi.AnnotatedParameter<?>)
      • InjectionPointConfigurator#read(javax.enterprise.inject.spi.InjectionPoint)

      AFAIK the InjectionPointConfigurator is available only during ProcessInjectionPoint lifecycle event. My question is why should I use any of these during this lifecycle event since I can easily call event.configureInjectionPoint()? Do we want to allow to configure different injection point in non corresponding ProcessInjectionPoint lifecycle event?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              tremes1@redhat.com Tomas Remes
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: