I'm not sure it needs a getter/setter generated or the type attribute
specified on the property annottaion.  The @property annotation could be
used on either a field or getter/setter method:

   @property(name="symbol")
   String value

or

   @property(name="symbol")
   public void setValue(String s) {
      value = s;
   }

or

   @property(name="symbol")
   public String getValue() {
      return value;
   }

The annotation is associated with the field or method so the type can easily
be introspected from that.

Also, when the annotation is associated with a method you can see if its a
getter or a setter so the action can be determined from the method name
(get=out, set=in).

   ...ant

On Nov 20, 2007 11:52 AM, Paul Fremantle <[EMAIL PROTECTED]> wrote:

> Sorry that wasn't very clear was it!
>
> Basically, I thought one approach would be to add a name and type
> parameter to the
> @property tag
>
> @property(name="symbol", type="String|OMElement",....)
>
> and then (I'm assuming - based on my limited knowledge of annotations) we
> could automatically generate getters and setters.
>
> The problem with this approach is that the getters/setters would not be
> available for command completion in the IDE, so I ditched this idea.
>
> Paul
>
>
> On Nov 20, 2007 11:47 AM, ant elder <[EMAIL PROTECTED]> wrote:
>
> >
> >
> > On Nov 20, 2007 11:44 AM, Paul Fremantle <[EMAIL PROTECTED]> wrote:
> >
> > <snip>
> >
> >  - the action could really be optional as its not so hard for the
> > > > runtime to see that the value has been changed and set/getandset would 
> > > > just
> > > > be a performance optimisation
> > >
> > > I guess so. It depends on whether we generate the property and
> > > getters/setters or not. I was kind of assuming that we wouldn't generate
> > > them. Alternatively we could cache values before and after the execute
> > > method, but thats a bit yucky, I think its so simple to use an annotation,
> > > and also since you get command completion for annotations inside IDEs we 
> > > can
> > > make it a required property.
> > >
> > >
> >
> > What do you mean by "generate the property and getters/setters"?
> >
> >    ...ant
> >
>
>
>
> --
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> OASIS WS-RX TC Co-chair
>
> blog: http://pzf.fremantle.org
> [EMAIL PROTECTED]
>
> "Oxygenating the Web Service Platform", www.wso2.com
>

Reply via email to