Re: [Simple-support] Subclassing with Simple XML Serialization
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2007-04-12 14:23:51
|
Hi=0A=0ATo your first question, is it possible to sub-class and override an= notated fields: =0A=0AYes, the most specialized class will take presecedanc= e over super classes for field annotations. =0A=0ATo the second, can you an= notate a method and override in a subclass: =0A=0AYou can, however only in = release 1.2, which will be released today some time. All you need to do is = annotate the bean setter and getter methods, subclasses can override the me= thod which will be used by the persister during serialization and deseriali= zatio.=0A=0AAlthough not officially released, 1.2 final build can be downlo= aded from =0A=0Ahttp://svn.sourceforge.net/viewvc/simple/trunk/download/str= eam/target/1.2/=0A=0ANiall=0A=0A=0A----- Original Message ----=0AFrom: Gill= es BRUNET <gil...@ho...>=0ATo: sim...@li...= t=0ASent: Thursday, April 12, 2007 3:14:38 PM=0ASubject: [Simple-support] S= ubclassing with Simple XML Serialization=0A=0A=0A=0A=0AP=0A{=0Amargin:0px;p= adding:0px;}=0Abody=0A{=0AFONT-SIZE:10pt;FONT-FAMILY:Tahoma;}=0A=0AHi,=0A = =0AHow the generalization and polymorphism are supported using Simple XML S= erialization?=0A =0AMore concretely: Is it possible to define a super class= with attributes and elements annotations, and to specialize it using a sub= -class with a root annotation? Is it possible to annotate virtual methods a= s attributes or elements in order to specialize them in sub-classes?=0A=0A = =0A=0AGilles B.=0A=0ASoyez parmi les premiers =E0 essayer Windows Live Mail= .-------------------------------------------------------------------------= =0ATake Surveys. Earn Cash. Influence the Future of IT=0AJoin SourceForge.n= et's Techsay panel and you'll get the chance to share your=0Aopinions on IT= & business topics through brief surveys-and earn cash=0Ahttp://www.techsay= .com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV=0A___________= ____________________________________=0ASimple-support mailing list=0ASimple= -su...@li...=0Ahttps://lists.sourceforge.net/lists/listin= fo/simple-support=0A=0A=0A=0A=0A=0A=0A=0A =0A________________________= ____________________________________________________________=0AWe won't tel= l. Get more on shows you hate to love =0A(and love to hate): Yahoo! TV's Gu= ilty Pleasures list.=0Ahttp://tv.yahoo.com/collections/265 |