Caleb Cushing opened SPR-17360 and commented
I find myself fairly often wanting to do stuff like this
public static String[] getFieldNames( Class<?> clazz ) {
return Stream.of( clazz.getDeclaredFields() ).map( Field::getName ).toArray( String[]::new );
}
however this is less efficient because it doesn't take advantage of a Field cache, I'd rather make use of Spring's Field Cache than use my own. So if I could write the following that'd be great.
public static String[] getFieldNames( Class<?> clazz ) {
return Stream.of( ReflectionUtils.getDeclaredFfields(clazz) ).map( Field::getName ).toArray( String[]::new );
P.S. I understand Util is not generally meant as a published api, though I still think it should be (and possibly in it's own jar)
No further details from SPR-17360
Comment From: bclozel
Declining because of a lack of demand.