Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-2242

Tapestry IOC StrategyBuilder should be able to create a Strategy for generic Class parameters

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 5.0.11
    • None
    • tapestry-ioc
    • None

    Description

      it is not possible to create a strategy for an interface that contains a method with a generic Class as parameter

      the example below will create an exception if getModel(...) of the created Strategy object is called

      public interface MLSelectModelFactory() {
      SelectModel getModel(Class<T> clazz);
      }

      public MLSelectModelFactory build(StrategyBuilder builder,
      Map<Class, MLSelectModelFactory> configuration) {

      StrategyRegistry<MLSelectModelFactory> registry =
      StrategyRegistry.newInstance(MLSelectModelFactory.class, configuration);

      return builder.build(registry);
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            kristian Kristian Marinkovic
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: