|
From: Bordet, S. <Sim...@co...> - 2002-01-18 16:57:45
|
Hi Jerome,
> >Hi Jerome,
> >
> >>>Ok, I thought some more on it, what about this ?
> >>>
> >>>/**
> >>>* @openjmx:managed-attribute description=3D"The status of this =
MBean"
> >>>*/
> >>>public int getStatus() {return 0;}
> >>>/**
> >>>* @openjmx:managed-attribute
> >>>*/
> >>>public void setStatus(int status) {}
> >>>
> >>>I specify always on getter the description information; I=20
> >>>
> >>just put the tag on the setter so that it will appear in the=20
> >>MBean interface. I will do a small change to the code so that=20
> >>getters are always processed before setters, so setters can=20
> >>have no description; if the attribute is write-only, then the=20
> >>setter will have the description.
> >>
> How can you deal with write-only attributes?
> You would only have a setStatus method in the implementation with=20
> no-comment??
No, see above... "if the attribute is write-only, then the setter will =
have the description."
It's in the openjmx implementation that I will do the trick: if getter =
present take its description and ignore the setter's, if no getter take =
the setter's one. However the trick costs nothing and it's completely =
transparent.
> >>Where do you want to emit the warning? in the resulting=20
> >>description? or=20
> >>on screen during the build process?
> >>The first option is easier and the later is more complex.
> >>
> >
> >The later will be perfect ;)=20
> >
> I did my best in order to avoid writing some specific XDoclet=20
> handlers=20
> for OpenJMX but due to the logic we want to put in, I have no=20
> choice :-(.
> Sniff... More pain scheduled :-)
No choice othen than... implement the latter ;) ? Or what ?
Simon
|