Field () { for (Class<?> aClass = InvocationEvent.class; aClass != null; aClass = aClass.getSuperclass()) { try { Field result = aClass.getDeclaredField("runnable"); result.setAccessible(true); return result; } catch (NoSuchFieldException ignore) { } } throw new InternalAPIChangedException(InvocationEvent.class, new NoSuchFieldException( "Class: " + InvocationEvent.class + " fieldName: " + "runnable" + " fieldType: " + Runnable.class)); }