Class enumClass = TestEnum.class;
System.out.println(TestEnum.我);
Method method = null;
method = enumClass.getDeclaredMethod("values", new Class[0]);
Object[] values = (Object[]) method.invoke(null, new Object[0]);
Assert.assertTrue(values.length > 0);
System.out.println(values[0]);
The method invocation blows out and complains uncompilable code
The reason seems to be related to
- auto compile on save
- anto deploy on save
feature: when they're turned off the problem went away! So weird!