Skip to content

added interface creation in JavaSourceCodeWriter #1632

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

Closed

Conversation

philipAthanasopoulos
Copy link

It used to be that JavaTypeDeclaration could not be an interface. I added Interface in the typeModifiers and if the type declaration is an Interface, the "class" keyword is skipped.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 1, 2025
@mhalbritter
Copy link
Contributor

Please reformat the files by running mvn spring-javaformat:apply, thanks.

@mhalbritter mhalbritter added the status: waiting-for-feedback We need additional information before we can continue label Mar 3, 2025
@philipAthanasopoulos philipAthanasopoulos force-pushed the main branch 2 times, most recently from 8857586 to b192b8b Compare March 3, 2025 09:30
@philipAthanasopoulos
Copy link
Author

I reformatted the code and mvn clean installruns successfully on my local environment.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Mar 3, 2025
@mhalbritter
Copy link
Contributor

I looked at the diff, and this doesn't look right. For example, there are changes to initializr-web/src/main/java/io/spring/initializr/web/mapper/DependencyMetadataV21JsonMapper.java which have nothing to do with JavaTypeDeclaration. Please rebase your changes on top of main to get a clean diff.

@philipAthanasopoulos
Copy link
Author

I reset my fork to upstream and pushed a single commit, hope its ok now

@mhalbritter
Copy link
Contributor

mhalbritter commented Mar 4, 2025

Thanks for the PR. Unfortunately there's more to it than the code already implemented: Interfaces can't have fields, only some modifiers are applicable to them, implementing other interfaces is done with extends (vs. implements for classes), etc etc. And we'd need to implement this for Kotlin and for Groovy, too. I've created #1633 for that, and we need a thorough design how to integrate it.

@mhalbritter mhalbritter closed this Mar 4, 2025
@mhalbritter mhalbritter added status: declined and removed status: feedback-provided Feedback has been provided status: waiting-for-triage An issue we've not yet triaged labels Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants