class Test { void foo(E... e) { } void bar() { foo(E.E1, E.E2); } } static enum E { E1, E2; }