I've given a number of examples on the past on how to do this.
A simple search on "using source generator with existing class" seems to do the the trick: http://www.mail-archive.com/[email protected]/msg05371.html --Keith Andi Kuhn wrote: > > Hi, > > i have a problem using the SourceGenerator with alreasy existing types. > I want to create a class e.g. Person that uses some other existing class as > attribute and not just a primitive string or integer. > > public class Person > { > private com.mycompany.MyExistingClass myAttribute; > > public void setMyAttribute( com.mycompany.MyExistingClass att ) > { > myAttribute = att; > } > public com.mycompany.MyExistingClass getMyAttribute() > { > return myAttribute; > } > } > > If i'd use primitve string instead of MyExisingClass schema would be > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" > > <xs:element name="Person"> > <xs:complexType> > <xs:sequence> > <xs:element name="myAttribute" type="xs:string"/> > </xs:sequence> > </xs:complexType> > </xs:element> > </xs:schema> > > I tried something like > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" > > <xs:element name="Person"> > <xs:complexType> > <xs:sequence> > <xs:element name="myAttribute"> > <xs:complexType/> > </xs:element> > </xs:sequence> > </xs:complexType> > </xs:element> > </xs:schema> > > Which already is near what i want, but creates a class MyAttribute, that i > don't want. > What do i have to do to tell the generator that the type should be my > existing class and also not creating this class ? > > Thanks for help, > Andi > -- > Andreas Kuhn Syngenio AG > Tel: +49 711 4903-490 Badstr. 9 > Fax: +49 711 4903-500 70372 Stuttgart > mailto:[EMAIL PROTECTED] http://www.syngenio.de > > The answer to 'can emacs...?' is always 'yes' > > ----------------------------------------------------------- > If you wish to unsubscribe from this mailing, send mail to > [EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
