users@jaxb.java.net

Re: xjc generated classes with bound properties support

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Thu, 04 Jan 2007 10:35:44 -0800

What a coincidence. Just look at the other "Re: xjc and
PropertyChangeSupport" thread.

Marcos wrote:
> Hi all,
>
> I'm new to JAXB and I've run the binding compiler (xjc) against one of mine .xsd
> files.
> One of the generated classes follows.:
>
> public class LoaderJob {
>
> /**
> * Sets the value of the logMode property.
> *
> * @param value
> * allowed object is
> * {_at_link String }
> *
> */
> public void setLogMode(String value) {
> this.logMode = value;
> }
>
> }
>
> Question.: Can the binding compiler be customized in such a way to insert the
> "...fireXXX" methods ?
> Below the desired result.:
>
> public class LoaderJob {
>
> /**
> * Sets the value of the logMode property.
> *
> * @param value
> * allowed object is
> * {_at_link String }
> *
> */
> public void setLogMode(String logMode) {
> String oldLogMode = this.logMode; /* Can this customization be
> perfomed by the binding compiler or another tool ??? */
> this.logMode = logMode; /* It's very boring to change
> each method manually ;-( and takes too much time since I've many classes.*/
> firePropertyChange("logMode", oldLogMode, logMode);
> }
>
> }
>
> Thank you very much
> Marcos --------------------------------------------------------------------- To
> unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net For additional
> commands, e-mail: users-help_at_jaxb.dev.java.net


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com