introduce_parameter_object
Bundle a method's parameters into a new parameter-object class and rewrite the method and all callers to use it.
Instructions
Bundle a method's parameters into a new parameter-object class and rewrite the method and all callers to use it. The class is generated as a member of the declaring type.
USAGE: Position on the method name; optionally name the class and parameter. OUTPUT: editsByFile with all required edits; warnings from JDT's condition checking. Edits are returned as text - apply them yourself.
IMPORTANT: Uses ZERO-BASED coordinates.
Requires load_project to be called first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to source file containing the method | |
| line | Yes | Zero-based line number of the method declaration | |
| column | Yes | Zero-based column number (on the method name) | |
| className | No | Name for the parameter-object class (default: <MethodName>Parameters) | |
| parameterName | No | Name for the new parameter (default: parameterObject) |