On Fri, Sep 6, 2013 at 10:43 PM, Felix Meschberger <fmesc...@adobe.com> wrote: > Hmm, why not turning this around and ammed the BindingsValueProvider > interface ? > >> public interface BindingsValuesProvider2 extends BindingsValueProvider { >> void addBindings(Bindings bindings, ScriptEngineFactory, String context); >> } >>...
What we have now is clearer IMO: BindingsValuesProvider always was and remains a simple provider of Bindings, that can be marked via service properties to apply to specific languages and contexts. BindingsValuesProvidersByContext is a source of BindingsValuesProvider, which takes context and languages into account to select them. Clients can also select the BVPs themselves directly based on their service properties, if that's more convenient or to avoid having to require the latest scripting api. What you're suggesting would be more confusing IMO, as having to use instanceof is somewhat ugly. -Bertrand