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

    • Type: Wish
    • Status: Closed
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 5.0.11
    • Fix Version/s: None
    • Component/s: tapestry-ioc
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: