Support Parameterized Types in Methods #116
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request handles the support of parameterized types when creating methods. Example:
Where
List<String>
is a parameterized type.In order to do this, we need to amend the
signature
of the method as the descriptor does not support it (it says class not found when trying to declareLjava.util.List<Ljava.lang.String;>;
).In order to resolve this, we have added a wrapper type
ParameterizedClass
where we can specify the wrapper type and the param types. Usage:This pull request partially resolves: #66 (which is intended to be for classes too)
Moreover, these changes are inspired by the changes in quarkusio/quarkus#26074 (that there will be deprecated once gizmo dependency is bumped).
I've verified these changes in Quarkus upstream too (reverting the changes of the mentioned Quarkus pull request) and it worked fine.