varargs非常奇怪的编译错误

tbo*_*odt 1 java enums compiler-errors

我正在为JVM中的所有操作码编写一个枚举.它不完整,到目前为止看起来像这样:

public enum Opcode {
    NOP(),
    ACONST_NULL(),
    ICONST_M1(),
    ICONST_0(),
    ICONST_1(),
    // a zillion more of these
    JSR_W();

    private Opcode(Class<? extends Argument> args...) {
    }
}
Run Code Online (Sandbox Code Playgroud)

构造声明的行上有一个编译错误:

')'预计

到底是怎么回事?

Sot*_*lis 10

...符号那张参数类型不是参数名称,像这样

private Opcode(Class<? extends Argument>... args) {
}
Run Code Online (Sandbox Code Playgroud)

为了彻底,Java语言规范声明方法的参数列表具有以下形式

FormalParameterList:
    LastFormalParameter
    FormalParameters , LastFormalParameter
Run Code Online (Sandbox Code Playgroud)

哪里LastFormatParameter有形式

LastFormalParameter:
    VariableModifiersopt Type... VariableDeclaratorId
    FormalParameter
Run Code Online (Sandbox Code Playgroud)

...参数的类型声明后说到.