Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Does ajc accept @Override on implementation of methods declared in an interface?

compiles just fine with -1.6 flag, not with -1.5 flag. (if you make
your m() method public in FooImpl)

Andy

On 5 August 2010 23:50, Olle Hallin <olle.hallin@xxxxxx> wrote:
> Hi!
> Does this compile in ajc?
> public interface Foo {
>   void m();
> }
> public class FooImpl implements Foo {
>   @Override
>   void m() {
>     // do something
>   }
> }
> Last time I checked (1.5-ish) it didn't.
> IMO this is a good design pattern, since it eliminates the risk for dead
> implementation code should one remove some method from the interface.
> Regards,
> Olle Hallin
> Senior Java Developer and Architect
> Crisp AB, Stockholm, Sweden
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>


Back to the top