Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expose ReflectionUtils.getDeclaredFields [SPR-17360] #21893

Closed
spring-projects-issues opened this issue Oct 10, 2018 · 1 comment
Closed

expose ReflectionUtils.getDeclaredFields [SPR-17360] #21893

spring-projects-issues opened this issue Oct 10, 2018 · 1 comment
Labels
in: core status: declined

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Oct 10, 2018

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

@spring-projects-issues spring-projects-issues added status: waiting-for-triage type: enhancement in: core and removed type: enhancement labels Jan 11, 2019
@bclozel
Copy link
Member

@bclozel bclozel commented Feb 18, 2022

Declining because of a lack of demand.

@bclozel bclozel closed this as completed Feb 18, 2022
@bclozel bclozel added status: declined and removed status: waiting-for-triage labels Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core status: declined
Projects
None yet
Development

No branches or pull requests

2 participants