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 06A77958D for ; Mon, 28 Nov 2011 17:39:01 +0000 (UTC) Received: (qmail 2563 invoked by uid 500); 28 Nov 2011 17:39:00 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 2440 invoked by uid 500); 28 Nov 2011 17:39:00 -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 2432 invoked by uid 99); 28 Nov 2011 17:39:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Nov 2011 17:39:00 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of simone.tripodi@gmail.com designates 209.85.213.171 as permitted sender) Received: from [209.85.213.171] (HELO mail-yx0-f171.google.com) (209.85.213.171) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Nov 2011 17:38:54 +0000 Received: by yenr9 with SMTP id r9so2484672yen.30 for ; Mon, 28 Nov 2011 09:38:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=1gPiFHO4VRMuci+A8X5bXhwMcpQPcDZVRpYNDIbd/qw=; b=bClW/FHkNK/bjQdbHllUMfyey9WdhdSYO6FQCP9WBrp61EPoqxbzZLweqzqT4Hp+UD ISfxwPA64RsXasPaZvrQNuz3qKKPcpwkQPxOURyq/hQ9XAf+XRKdEdp7LHMJq0ZWI0W8 LlWerM8JfIlViasBEhmCXTjKITW6vcDNH0w2s= MIME-Version: 1.0 Received: by 10.236.201.196 with SMTP id b44mr21223909yho.48.1322501913090; Mon, 28 Nov 2011 09:38:33 -0800 (PST) Sender: simone.tripodi@gmail.com Received: by 10.150.28.6 with HTTP; Mon, 28 Nov 2011 09:38:32 -0800 (PST) In-Reply-To: References: Date: Mon, 28 Nov 2011 18:38:32 +0100 X-Google-Sender-Auth: RtGrBLA_dxKy3vbQP8x-N_82gw0 Message-ID: Subject: Re: [digester] help on fixing DIGESTER-153 From: Simone Tripodi To: Commons Developers List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi Matt! :) thanks a lot in advance for your help, you cannot imagine how many tries I already gave - and how many different bytecode FW I tested - without success! You would be my hero of 2011! :) ALL THE BEST! Simo http://people.apache.org/~simonetripodi/ http://simonetripodi.livejournal.com/ http://twitter.com/simonetripodi http://www.99soft.org/ On Mon, Nov 28, 2011 at 3:48 AM, Matt Benson wrote: > Sorry, I missed this. =C2=A0I've done something like this before. =C2=A0P= ing me > in a few days. =C2=A0:) > > Matt > > On Mon, Nov 14, 2011 at 5:58 AM, Simone Tripodi > wrote: >> Hi James! >> many thanks in advance!!! All the best, >> Simo >> >> http://people.apache.org/~simonetripodi/ >> http://simonetripodi.livejournal.com/ >> http://twitter.com/simonetripodi >> http://www.99soft.org/ >> >> >> >> On Mon, Nov 14, 2011 at 12:51 PM, James Carman >> wrote: >>> Sounds easy enough, but it might involve rethinking the guts of digeste= r a >>> bit. =C2=A0Let me "digest" on that a bit, but I think we can do it some= what >>> easily. >>> >>> Sent from tablet device. =C2=A0Please excuse typos and brevity. >>> On Nov 14, 2011 3:02 AM, "Simone Tripodi" wr= ote: >>> >>>> Hi all guys, >>>> I'm writing to ask you all a big help on fixing that issues that is >>>> spoling my sweet dreams and completely blocking for the rest :) >>>> >>>> The well known issue is that the Digester has been able to create >>>> objects using only the default empty constructor, that is because >>>> instances are created when the XML elements begin. >>>> >>>> Thanks to Matt Benson's effort, using CGLIB it is possible to create >>>> instances using arbitrary constructors, extracting arguments from the >>>> same matching XML element attributes. >>>> >>>> I am sure we can do even more, extracting constructor arguments from >>>> nested elements, I mean, given the following POJO: >>>> >>>> class MyBean >>>> { >>>> >>>> =C2=A0// (g|s)etter omitted >>>> =C2=A0private float floatProperty; >>>> >>>> =C2=A0public MyBean( double doubleProperty, boolean booleanProperty ) >>>> =C2=A0 =C2=A0... >>>> } >>>> >>>> and the following XML snippet >>>> >>>> >>>> =C2=A0 >>>> =C2=A0 =C2=A0true >>>> =C2=A0 =C2=A05.5 >>>> =C2=A0 >>>> >>>> >>>> I would like - but don't know how, that's here that I need help - via >>>> CGLIB (or something similar) implementing a Lazy Initialization policy >>>> that allows us creating a proxy that tracks the Object methods >>>> invocations, but the constructor and methods will be invoked only when >>>> the matchin XML element terminates. >>>> >>>> Just to be more clear: >>>> >>>> >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= >>>> =C2=A0 =C2=A0true =C2=A0 =C2=A0 >>>> =C2=A0 =C2=A05.5 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 >>>> >>>> >>>> Do you think that would be possible? >>>> Many thanks in advance, all the best! >>>> Simo >>>> >>>> http://people.apache.org/~simonetripodi/ >>>> http://simonetripodi.livejournal.com/ >>>> http://twitter.com/simonetripodi >>>> http://www.99soft.org/ >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >>>> For additional commands, e-mail: dev-help@commons.apache.org >>>> >>>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >> For additional commands, e-mail: dev-help@commons.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org