Provide templating support for adding a parameter to a Java method
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reading CoordinateBuilder.MethodDeclaration::replaceParameters and the surrounding Java templating and coordinate APIs. Determine how a JavaCoordinates.MethodDeclaration::addParameter operation can accept a position, including first, last, or a 0-based index; done means callers can add a parameter at the requested position without replacing the existing list.
Written by the indexing model from the issue text.
Description
Currently the only manipulation available for templatizing changes to the parameters of Java method declarations is the CoordinateBuilder.MethodDeclaration::replaceParameters method, which is unsuitable for cases where an additional parameter needs to be added at a specified position to a list of existing ones.
A JavaCoordinates.MethodDeclaration::addParameter (or something equivalent) would be ideal for this use case, with some ability to specify the position of the new parameter (e.g. a 0-based index together with symbolic last/first values).
- Dominant language
- Java
- Stars
- 3.7k
- Forks
- 571
- Avg merge
- 13h 12m
- Merged PRs (30d)
- 261
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openrewrite/rewrite
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
openrewrite/rewrite#8654 ·
-
bug gradle
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
openrewrite/rewrite#7576 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
openrewrite/rewrite#3406 · 8 comments · 1 reaction ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 75/100
openrewrite/rewrite#8879 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 70/100
openrewrite/rewrite#8862 · 1 comment ·
All issues in openrewrite/rewrite
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
objectionary/hone-maven-plugin#1061 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
spring-projects/spring-modulith#1895 ·