Skip to main content

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

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


Back to the top