convert_anonymous_to_lambda
Converts anonymous classes implementing a functional interface to lambda expressions. Returns the text edit needed; apply it to perform the 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 |
|---|---|---|---|
| column | Yes | Zero-based column number | |
| line | Yes | Zero-based line number of anonymous class (on 'new' keyword) | |
| filePath | Yes | Path to source file |