0
我在任何地方都搜索過這個問題。我發現的最接近是在這裏:在「添加未實現的方法」接口中導入註釋
Why Eclipse does not include annotations when implementing methods from a Java interface?
我想知道的,是我可以包括在接口中使用註釋。例如:
package com.example.package
public interface IInterface {
@ImportantInformation
public void doSomethingImportant();
}
,然後在我的課:
package com.example.package
public class SomeClass implements IInterface {
@Override
@ImportantInformation
public void doSomethingImportant() { }
}
我怎樣才能讓Eclipse自動當我使用這樣做「添加未實現的方法。」?
我查看了項目屬性和窗口屬性,並找不到任何有關此問題的信息。我已經徹底搜索了它,並瀏覽了Eclipse網站。
我有同樣的問題,正如你在我的問題中看到的那樣 –