get_method_code_by_full_name
Retrieve source code for specific methods using their fully qualified names to support code review and security analysis workflows.
Instructions
Get the code of a method by its fully name, If you know the full name of the method, you can use this tool to get the method code directly. If you only know the full name of the class and the name of the method, you should use get_method_code_by_class_full_name_and_method_name @param method_full_name: The fully qualified name of the method (e.g., com.android.nfc.NfcService$6.onReceive:void(android.content.Context,android.content.Intent)) @return: The source code of the specified method
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method_full_name | Yes |
Implementation Reference
- server_tools.py:78-85 (handler)Handler function for the 'get_method_code_by_full_name' tool. It queries the Joern server via joern_remote and extracts the method source code using extract_value.def get_method_code_by_full_name(method_full_name:str) -> str: """Get the code of a method by its fully name, If you know the full name of the method, you can use this tool to get the method code directly. If you only know the full name of the class and the name of the method, you should use get_method_code_by_class_full_name_and_method_name @param method_full_name: The fully qualified name of the method (e.g., com.android.nfc.NfcService$6.onReceive:void(android.content.Context,android.content.Intent)) @return: The source code of the specified method """ response = joern_remote(f'get_method_code_by_method_full_name("{method_full_name}")') return extract_value(response)