You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Nikita Timofeev (JIRA)" <ji...@apache.org> on 2017/03/09 18:41:38 UTC
[jira] [Updated] (CAY-2258) DI: typesafe binding of List and Map
[ https://issues.apache.org/jira/browse/CAY-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nikita Timofeev updated CAY-2258:
---------------------------------
Fix Version/s: 4.0.M6
> DI: typesafe binding of List and Map
> -------------------------------------
>
> Key: CAY-2258
> URL: https://issues.apache.org/jira/browse/CAY-2258
> Project: Cayenne
> Issue Type: Improvement
> Components: Core Library
> Reporter: Nikita Timofeev
> Assignee: Nikita Timofeev
> Labels: DI
> Fix For: 4.0.M6
>
>
> The goal of this improvement is to add compile time type-safety to dependency injection of Lists and Maps.
> *Proposed changes in DI API*:
> Add following methods in {{Binder}} interface
> {code}
> <T> MapBuilder<T> bindMap(Class<T> valueType);
> <T> MapBuilder<T> bindMap(Class<T> valueType, String bindingName);
> <T> ListBuilder<T> bindList(Class<T> type, String bindingName);
> <T> ListBuilder<T> bindList(Class<T> type);
> {code}
> And deprecate non type-safe methods:
> {code}
> <T> MapBuilder<T> bindMap(String bindingName);
> <T> ListBuilder<T> bindList(String bindingName);
> {code}
> *Incompatibility*
> If Cayenne DI is used in third-party code (custom modules or Cayenne modifications) the code should be updated if bindings other than {{List<Object>}} and {{Map<String, Object>}} were used, as this code will be broken.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)