|
From: B. <jer...@xt...> - 2002-01-18 14:35:07
|
Bordet, Simone wrote:
>Hi Jerome,
>
>
>Ok, I thought some more on it, what about this ?
>
>/**
> * @openjmx:managed-attribute description="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 just put the tag on the setter so that it will appear in the MBean interface. I will do a small change to the code so that getters are always processed before setters, so setters can have no description; if the attribute is write-only, then the setter will have the description.
>
>About access I don't care anymore.
>
I have attached another proposition I have. There is the implementation
(a little bit more complex than before) and the resulting interface and
description.
I am now trying to verify if there are the getter/setter methods.
>>>Is there a way to enforce check of this kind of mistakes ?
>>>
>>If a method is described as operation, but it's an attribute,
>>can i know this when I'm generating the code with XDoclet ?
>>
>>This is linked to question 1). I will look for a way to check those
>>things but I am not sure it will be so easy.
>>
>
>Should not be that difficult; you can copy/paste the method Utils.isAttributeGetter/Setter to know if a method is an attribute accessor; if you find the managed-operation tag on the method, emit a warning or an error. The opposite for operations.
>
Where do you want to emit the warning? in the resulting description? or
on screen during the build process?
The first option is easier and the later is more complex.
>>>If you have time, can you write a document on this beautiful
>>>
>>feauture, when will be ready ?
>>
>>>If you don't have time just tell, we must absolutely write
>>>
>>something about for users.
>>
>>I guess I could, but english is not my native language, and I am not
>>sure to be the best person for writing documentation: my
>>english style
>>is quite poor. I can however write a draft that someone could
>>"re-style" i guess :-)
>>
>
>Too modest :)
>Write it, I guess will be perfect.
>
Ok. Anyway we will see :-)
Jerome.
>
|