gpt4 book ai didi

java - 无法获得实现扩展另一个接口(interface)以进行编译的接口(interface)的 Java 枚举

转载 作者:行者123 更新时间:2023-11-29 06:38:20 25 4
gpt4 key购买 nike

我想创建一个实现 I2 的枚举,它扩展了 I1:

package a;

import static a.E1.E1A;
interface I1 extends I1 {}
interface I2 extends I1 {}
enum E1 implements I2 { E1A, A1B; }

class A {
public static void main(String[] args) {
switch (E1A) {
case E1A:
System.out.println("it worked!");
}
}
}

在我添加 I1 并使 I2 扩展 I1 之前它一直有效。现在它可以工作了,但找不到 E1A(以前有静电,所以这不是问题):

$ javac A.java
A.java:3: cannot find symbol
symbol : static E1A
location: class a.E1
import static a.E1.E1A;
^


The system is out of resources.
Consult the following stack trace for details.
java.lang.StackOverflowError
at com.sun.tools.javac.code.Types$18.visitClassType(Types.java:1630)
at com.sun.tools.javac.code.Types$18.visitClassType(Types.java:1620)
at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:568)
at com.sun.tools.javac.code.Types$UnaryVisitor.visit(Types.java:3294)
at com.sun.tools.javac.code.Types.supertype(Types.java:1617)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:889)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:891)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:897)
[...]

为什么?

最佳答案

我用 Javac 1.7.0_15 得到这个

C:\Users\Andry\test>javac a\A.java
a\A.java:4: error: cyclic inheritance involving I1
interface I1 extends I1 {}
^
1 error

你的代码是错误的(接口(interface)不能 self 扩展),但你可能发现了 javac 中的错误!

关于java - 无法获得实现扩展另一个接口(interface)以进行编译的接口(interface)的 Java 枚举,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16699886/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com