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

Creates invalid imports when defining array for ClassName instance #119

Open
Thorinwasher opened this issue Nov 11, 2024 · 0 comments
Open

Comments

@Thorinwasher
Copy link

Thorinwasher commented Nov 11, 2024

What happened?

I'm generating code that uses arrays in parameters / return types for methods. When compiling these, the classes for those are not defined. I therefore use the ClassName class to define this. The main problem I'm experiencing is that the imports become messed up if I try to add [] after the class name, it can for example looks like this:

import org.mockbukkit.integrationtester.resource.ResourcePackInfoLikeMirror[];

So to say, the array specifier becomes included into the import, which makes the project not compile.

What did you want to happen?

Either make it possible to programatically specify arrays for ClassName instances, or remove the [] qualifier from the simplified name when generating imports.

Contribution

I can make a pr for this if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant