ok.. it worked fine.. didn't generated annotation itself, but the
old-fashion @deprecated javadoc :)
I will use it for now, but I am also interested in other annotations..
like my custom annotations.. I guess it would be an important
enhacement to JAXB ... I tought to submit an issue in the jaxb site,
but I would like to know the community oppinion about that..
perhaps it is just my problem, but I guess other people can be
dreaming with this feature :)
> <xsd:annotation> <xsd:appinfo>
> <jxb:class>
> <jxb:mark>deprecated</jxb:mark> <-- something like this :)
> </jxb:class>
> </xsd:appinfo> </xsd:annotation>
On Nov 28, 2007 11:35 AM, Pierre Buyle <pierre.buyle_at_irislink.com> wrote:
>
> You can use the <javacdoc> customization tag on your XSD type. Either
> directly in your .xsd or in a separate binding file.
>
> <xsd:schema jxb:version="2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:jxb="http://java.sun.com/xml/ns/jaxb">
> <xsd:complexType name="DeprecatedType">
> <xsd:annotation>
> <xsd:appinfo>
> <jxb:class>
> <jxb:javadoc>@deprecated</jxb:javadoc>
> </jxb:class>
> </xsd:appinfo>
> </xsd:annotation>
> <!-- Your type definition -->
> </xsd:complexType>
> </xsd:schema>
>
>
>
> Felipe Gaucho wrote:
> >
> > How can I generate annotated classes with JAXB ?
> >
> > I want to generate a class like that:
> >
> > @Deprecated
> > public void MyClass {}
> >
> > @Deprecated is my primary goal, but I am also interested in figure out
> > how to add any annotation to classes ? How to define it in the Schem
> > or using customization...
> >
> >
> > The reason I am looking for that: I am using JAXB as configuration
> > framework of my application, and some of the configuration values
> > should not be used anymore. In order to keep the compatibility with
> > old configuration files, I don't want to rid off the declaration of
> > the obsolete fields, but rather annotate it as deprecated.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> > For additional commands, e-mail: users-help_at_jaxb.dev.java.net
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/generating-Annotated-classes-with-JAXB---tf4887472.html#a13989622
> Sent from the java.net - jaxb users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>