extract_interface
Extract an interface from a Java class by selecting public methods. Generates a new interface file and modifies the original class to implement it.
Instructions
Extract an interface from a class containing selected public methods.
Returns the text for a new interface file and edits to add 'implements' clause to the original class.
USAGE: Position on class, provide interface name, optionally specify methods OUTPUT: Interface file content and class modification edit
IMPORTANT: Uses ZERO-BASED coordinates.
Requires load_project to be called first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| column | Yes | Zero-based column number | |
| filePath | Yes | Path to source file containing the class | |
| methodNames | No | Specific method names to include (default: all public non-static methods) | |
| interfaceName | Yes | Name for the new interface | |
| line | Yes | Zero-based line number of class declaration |