* Get the class name from the .class directive in the document.
(document: vscode.TextDocument)
| 115 | * Get the class name from the .class directive in the document. |
| 116 | */ |
| 117 | function getClassNameFromDocument(document: vscode.TextDocument): string { |
| 118 | const text = document.getText(); |
| 119 | const match = text.match(/\.class\s+[^L]*L([^;]+);/); |
| 120 | return match ? match[1] : "unknown/Class"; |
| 121 | } |
| 122 | |
| 123 | /** |
| 124 | * Generate Frida TypeScript hook code for a method. |