convert_anonymous_to_lambda
Transform Java anonymous classes implementing functional interfaces into lambda expressions by providing text edits for code conversion.
Instructions
Convert an anonymous class implementing a functional interface to a lambda expression.
Returns the text edit needed to convert the anonymous class to a lambda. The caller should apply this edit to perform the conversion.
USAGE: Position cursor on the 'new' keyword of the anonymous class OUTPUT: Edit to replace anonymous class with lambda
IMPORTANT: Uses ZERO-BASED coordinates. REQUIREMENTS: The anonymous class must implement a functional interface (exactly one abstract method).
Requires load_project to be called first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to source file | |
| line | Yes | Zero-based line number of anonymous class (on 'new' keyword) | |
| column | Yes | Zero-based column number |