Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A43BA11051 for ; Mon, 18 Aug 2014 06:15:18 +0000 (UTC) Received: (qmail 99240 invoked by uid 500); 18 Aug 2014 06:15:18 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 99158 invoked by uid 500); 18 Aug 2014 06:15:18 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 99146 invoked by uid 99); 18 Aug 2014 06:15:18 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Aug 2014 06:15:18 +0000 Date: Mon, 18 Aug 2014 06:15:18 +0000 (UTC) From: "David Jencks (JIRA)" To: dev@felix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (FELIX-4607) [DS] Configure with nested annotations/interfaces MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FELIX-4607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Jencks updated FELIX-4607: -------------------------------- Fix Version/s: scr-2.0.0 > [DS] Configure with nested annotations/interfaces > ------------------------------------------------- > > Key: FELIX-4607 > URL: https://issues.apache.org/jira/browse/FELIX-4607 > Project: Felix > Issue Type: New Feature > Components: Declarative Services (SCR) > Affects Versions: scr-2.0.0 > Reporter: David Jencks > Assignee: David Jencks > Fix For: scr-2.0.0 > > > RFC 190 has the unfortunate limitation that annotations used for configuration cannot have annotation field values. This is easy to remedy if we pick a format for mapping typed data trees into a map. I'm going to implement this following James Strachan's system for creating an xml DSL for spring configuration for ActiveMQ (see also geronimo's xbean-spring and xbean-blueprint) and inspired by xpath. > Here's an example of how the mapping works. Lets say you have annotations > A { B[] b();} and B { String foo();}. The configuration map will have entries with keys of the form: > b.0.foo > b.1.foo > b.2.foo > b..foo > .. > Obviously this can be extended to any level of nesting. Non array annotation valued elements will correspond to arrayIndex 0. > To extend support to interfaces with inheritance, it's also necessary to include the class of the desired sub-interface in the source map. I don't have a proposal yet for the name of the sub key. -- This message was sent by Atlassian JIRA (v6.2#6252)