[英]IntelliJ IDEA not showing member field
問題如下圖所示,是否有任何選項可以顯示成員abc
?
我使用IntelliJ IDEA CE 2017.2.1和JDK 9 + 179。
以下是上面的示例代碼:
public class Test {
@FunctionalInterface
interface IF {
String abc = "abc";
void apply();
}
public static void main(String[] args) {
IF theIF = ()->{};
System.out.println(theIF.abc); // I can print `abc` value here, but...
theIF. // DOT here(press ctrl + space) not show member `abc`
}
}
這是使用實例限定符訪問靜態成員,最好以IF.abc
完成。 因此代碼完成不會立即提供,但如果您第二次按Ctrl + Space,則應該建議。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.