Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-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 60D23990D for ; Thu, 3 Jan 2013 00:49:52 +0000 (UTC) Received: (qmail 92237 invoked by uid 500); 3 Jan 2013 00:49:51 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 92158 invoked by uid 500); 3 Jan 2013 00:49:51 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 92149 invoked by uid 99); 3 Jan 2013 00:49:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jan 2013 00:49:51 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gudnabrsam@gmail.com designates 74.125.83.53 as permitted sender) Received: from [74.125.83.53] (HELO mail-ee0-f53.google.com) (74.125.83.53) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jan 2013 00:49:43 +0000 Received: by mail-ee0-f53.google.com with SMTP id c50so7073128eek.12 for ; Wed, 02 Jan 2013 16:49:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:date:message-id:subject:from:to:content-type; bh=y6Dokp+MaGYVMgJeX/OP93Sj9WvV8MUMELsCGku8MXU=; b=RhMmSacLoEEKaum8ZgURMJT3CZGKzatR1rEUy/rj3zNqqtBpxxFmiXf9qzILXJ+SB3 +7i4g/FRwLCpYrxMFIL3LVrtk4YcX0PaJAomHrIFdVLbcjDyJ1eFbvt+UHRPmXn7vSp5 p6FDd/N4OZZQmLBsY7nrL2gIhIBHf2l49Vo1MJTrL9PZEMCA+7gkAAvVvBM7+ZmpXWLS VMEqbNGEel8S2q97J0QeGxc/2Fcu1Aqjdnxj28AHU9UfFZv9DEMzukq0+hX/Zp51Exoy 89fExqLaiq9xw9TK32iycJdoSAbIzyu3zzZC0P6Aw7ox3+kefR8Mq9fwCVO7mXv/VCxb ftjg== MIME-Version: 1.0 Received: by 10.14.202.3 with SMTP id c3mr129919231eeo.4.1357174163256; Wed, 02 Jan 2013 16:49:23 -0800 (PST) Received: by 10.223.64.145 with HTTP; Wed, 2 Jan 2013 16:49:22 -0800 (PST) Reply-To: gudnabrsam@gmail.com Date: Wed, 2 Jan 2013 18:49:22 -0600 Message-ID: Subject: [weaver] SPI decisions From: Matt Benson To: dev@commons.apache.org Content-Type: multipart/alternative; boundary=047d7b3436ace635e804d257bb74 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b3436ace635e804d257bb74 Content-Type: text/plain; charset=ISO-8859-1 Hi all, and especially Mark S.--in case I've not done it publicly enough yet, many thanks to Mark for picking up where I had left off with the privilizer/weaver code. I think the two of us (others? :D) would like to reach a point at which the library is usable, so I submit the following talking points: Weaver#weave(): Currently there are separate methods for weaving a class vs. a method. I think it would be sufficient and cleaner to have a class weaving method only; having provided its "interests," the Weaver can presumably figure out what to do with a class that has been determined to match. Next, it feels a little odd to use a loaded Class instance to represent a class intended for modification. Should we just use classname here? Weaver#getInterest(): Rather than providing List>, I wonder whether it would be more future-proof for this method (pluralized?) to return Map, ElementType> to say not only which Annotation types it is interested in, but where they are expected to be found. This could work comfortably with the type of search registration APIs we've discussed for [classscan] in the future. Weaver#configure(): This method supplies a target directory where classes are to be found. Perhaps too optimistically, I envision a future that could include a [weaver] ClassLoader to apply our advice at run, rather than build, time. Does anyone have any relevant experience that would guide us in providing the most flexible API to permit weaving of classfiles whether on the filesystem or otherwise? Is it going too far to pull in [vfs] v2-core as a dependency? Thanks, Matt --047d7b3436ace635e804d257bb74--