java_rename_field
Rename a Java field and automatically update all references in the codebase using OpenRewrite.
Instructions
Rename a Java field and update all references using OpenRewrite
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectPath": "<projectPath>",
"className": "<className>",
"oldFieldName": "<oldFieldName>",
"newFieldName": "<newFieldName>"
},
"name": "java_rename_field"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | Preview changes without applying (default: true) | |
| className | Yes | Fully qualified class name containing the field | |
| javaVersion | No | Java version to use (e.g., "17.0.16-amzn", "21.0.8-tem") | |
| projectPath | Yes | Path to the Java project root | |
| newFieldName | Yes | New field name | |
| oldFieldName | Yes | Current field name |