jastrachan | 2 Feb 12:44 2005
Picon

Re: using annotations instead of a keyword for bean properties


On 2 Feb 2005, at 09:25, Russel Winder wrote:

> On Wed, 2005-02-02 at 08:44 +0000, jastrachan@... wrote:
>
> [ . . . ]
>
>> One comment, in Java 5 annotations are typed, so the convention 
>> appears
>> to be to use upper case names for annotations. So it might be better 
>> to
>> use
>
> Annotations are implemented as interfaces in Java 5.0.

Agreed

>> class Person
>>     <at> Property String name
>>     <at> Property int age
>> }
>>
>> then it matches the feel of Java 5 annotations?
>
> This just makes so much sense I cannot imagine people voting against 
> it.
> Of course the only problem is that this is a special form of annotation
> not implemented using the usual annotation mechanism.

Or to put that another way; we'd be saying that (from a Java 5 
perspective) Groovy defines an annotation, something like 
groovy.lang.Property which is picked up by default in Groovy scripts 
unless you explicit import / declare another - which the Groovy runtime 
interprets to make bound/unbound/vetoable properties.

James
-------
http://radio.weblogs.com/0112098/


Gmane