Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 95278 invoked from network); 4 Jan 2008 18:12:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Jan 2008 18:12:09 -0000 Received: (qmail 94105 invoked by uid 500); 4 Jan 2008 18:11:54 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 94045 invoked by uid 500); 4 Jan 2008 18:11:54 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 94036 invoked by uid 99); 4 Jan 2008 18:11:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jan 2008 10:11:54 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of uma_rk@comcast.net designates 76.96.62.16 as permitted sender) Received: from [76.96.62.16] (HELO QMTA01.westchester.pa.mail.comcast.net) (76.96.62.16) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jan 2008 18:11:41 +0000 Received: from OMTA05.westchester.pa.mail.comcast.net ([76.96.62.43]) by QMTA01.westchester.pa.mail.comcast.net with comcast id Z0Un1Y0040vyq2s050W600; Fri, 04 Jan 2008 18:11:33 +0000 Received: from rmailcenter99.comcast.net ([204.127.197.199]) by OMTA05.westchester.pa.mail.comcast.net with comcast id Z6BN1Y0054Jcias3R00000; Fri, 04 Jan 2008 18:11:22 +0000 X-Authority-Analysis: v=1.0 c=1 a=RZ3HVLRDgHEA:10 a=fmpLHjNWcqHj32lWxW8Bvw==:17 a=qgSTdtRVpqoh9Iw-wBIA:9 a=Ua5hJ5W12uUDAFYRKsIA:7 a=aRH6XkxIdSebqc8E5bRVOywl4LoA:4 a=si9q_4b84H0A:10 a=I2EqgwFF2xUA:10 Received: from [171.71.227.242] by rmailcenter99.comcast.net; Fri, 04 Jan 2008 18:11:32 +0000 From: uma_rk@comcast.net To: "Jakarta Commons Users List" Subject: Re: [Betwixt]: Writing polymorphic beans Date: Fri, 04 Jan 2008 18:11:32 +0000 Message-Id: <010420081811.13788.477E76D400098DE9000035DC2213528573059DA10E039A@comcast.net> X-Mailer: AT&T Message Center Version 1 (Oct 30 2007) X-Authenticated-Sender: dW1hX3JrQGNvbWNhc3QubmV0 X-Virus-Checked: Checked by ClamAV on apache.org I would appreciate any suggestions/examples on this. Thanks! /U -------------- Original message ---------------------- From: uma_rk@comcast.net > Env: JDK1.6, Betwixt 0.8 > > I have a bean A which contains a polymorphic reference to a bean B or C via > an interface as follows: > > class A { > private IVehicle vehicle; > public IVehicle getVehicle() { ... } > public void setVehicle(final IVehicle v) { ... } > } > > class Car implements IVehicle { ... } > class Bus implements IVehicle { ... } > > > I need to write an instance of A out as follows: > > > > ... > > > > or as > > > > ... > > > > If I use a betwixt file as follows: > > > > > > > > I get ... > > which is clearly wrong. How can I use the PolymorphicReferenceResolver to > identify > if or must be emitted? > > Can you point me to a sample? > > Thanks, > > /U > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org