ReflectionUtils { public static <T> Collection<T> getStaticFieldValues(Class<?> clazz, Class<T> type) { return getFieldValues(clazz, type, null); } private  ReflectionUtils(); static Collection<E> getByModifier(E[] executables, int modifier); static Option<Method> getMethod(Class<?> clazz, String methodName, Class<?>... parameterTypes); static List<Method> getMethods(Class<?> clazz, String methodName); static Set<Method> getMethodsAnnotatedWith(Class<?> clazz, Class<? extends Annotation> annotation); static Collection<T> getStaticFieldValues(Class<?> clazz, Class<T> type); @SuppressWarnings("unchecked") static Collection<R> getFieldValues(Class<T> clazz, Class<R> type, @Nullable T instance);  }
@Test void getStaticFieldValues() { Collection<String> values = ReflectionUtils.getStaticFieldValues(Foo.class, String.class); Assertions.assertEquals(1, values.size()); Assertions.assertEquals("static-value", values.iterator().next()); }