Consideration on current annotations

0 views
Skip to first unread message

Marco Tedone

unread,
Aug 15, 2010, 1:06:06 PM8/15/10
to jpatterns
It’s a pity that annotations can’t be extended, otherwise we could
have had a DefaultPattern as follows:

package org.jpatterns.core;

public @interface DefaultPattern {

Class[] participants() default {};

String comment() default “”;

}

And then any “sub-annotation in a pattern” could have just “extended
the above interface (I mean interface extends interface, don’t get me
wrong :-) )

Dr Heinz M. Kabutz

unread,
Aug 15, 2010, 1:09:58 PM8/15/10
to jpat...@googlegroups.com
Yes, it's a pity. Maybe we can make a recommendation for Java 8 ... :-)

Regards

Heinz
--
Dr Heinz M. Kabutz (PhD CompSci)
Author of "The Java(tm) Specialists' Newsletter"
Sun Java Champion
http://www.javaspecialists.eu
Tel: +30 69 72 850 460
Skype: kabutz

On 8/15/10 8:06 PM, Marco Tedone wrote:
> It�s a pity that annotations can�t be extended, otherwise we could


> have had a DefaultPattern as follows:
>
> package org.jpatterns.core;
>
> public @interface DefaultPattern {
>
> Class[] participants() default {};
>

> String comment() default ��;
>
> }
>
> And then any �sub-annotation in a pattern� could have just �extended
> the above interface (I mean interface extends interface, don�t get me
> wrong :-) )
>
>

Riaan Cornelius

unread,
Aug 15, 2010, 4:44:10 PM8/15/10
to jpat...@googlegroups.com
At the current rate, that would probably be in about 2020...
Reply all
Reply to author
Forward
0 new messages