A lightweight IntelliJ IDEA plugin that extracts and exports Java method information from your project into a single JSON file.
This plugin is designed to provide a comprehensive, static snapshot of your project's Java methods, enabling powerful external analysis.
-
Method Detail Extraction: Automatically identifies all Java methods within the open project.
-
Method Body Tracking: Extracts the name and the body content for each identified method.
-
Automated JSON Export: Dumps all collected method data into a structured JSON file upon project opening.
Prerequisites
- IntelliJ IDEA (Community or Ultimate Edition)
- Java Development Kit (JDK) 21 or newer
- Gradle
Run Steps
- Clone the repository:
git clone <URL>- Open in IntelliJ IDEA:
- In the main IntelliJ welcome screen, select Open.
- Navigate to and select the
JBMethods2JSONdirectory. - IntelliJ IDEA will automatically detect the Gradle project and import necessary SDKs.
- Run the Sandbox Instance:
- Locate the Gradle tool window (usually on the right side of the IDE).
- Navigate to Tasks > intellij platform > runIde.
- Double-click runIde to execute the task.
OR
- Clone the repository:
git clone <URL>- Navigate to the project's root directory:
cd JBMethods2JSON/- Run the snadbox:
./gradlew runIde # Unix / macOS / Linux
gradlew.bat runIde # WindowsThis will launch a new, separate IntelliJ IDEA instance known as the Sandbox, with the plugin already installed and active.
After indexing finishes, methods.json file appears in the root directory with all the method names and bodies in JSON format.
Sample methods.json file for this project can be found in this repository.