https://github.com/chiragpadyal/method-invocations-spoon
This is a simple Java method invocation printer. It is a simple tool that can be used to print the method invocations of a Java class. It is useful for debugging and understanding the flow of a Java program.
https://github.com/chiragpadyal/method-invocations-spoon
java maven spoon static-code-analysis
Last synced: about 19 hours ago
JSON representation
This is a simple Java method invocation printer. It is a simple tool that can be used to print the method invocations of a Java class. It is useful for debugging and understanding the flow of a Java program.
- Host: GitHub
- URL: https://github.com/chiragpadyal/method-invocations-spoon
- Owner: chiragpadyal
- License: mit
- Created: 2024-02-10T13:24:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-10T13:35:51.000Z (over 1 year ago)
- Last Synced: 2025-10-04T03:56:02.158Z (about 19 hours ago)
- Topics: java, maven, spoon, static-code-analysis
- Language: Java
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Java Method Invocation Printer
## Introduction
This is a simple Java method invocation printer. It is a simple tool that can be used to print the method invocations of a Java class. It is useful for debugging and understanding the flow of a Java program.## Usage
To use the tool, simply run the following command:
```
java -jar method-invocations-1.0.0-jar-with-dependencies.jar -m -t -p
```## Output
The tool will print the method invocations of the specified method. The output will be in the json format the output will also be saved in a file called `call_hierarchy.json` in the current directory.
```
$ java -jar method-invocations-1.0.0-jar-with-dependencies.jar -m org.jfree.chart.JFreeChart.createBufferedImage -t APP -p /path/to/maven/projectoutput:
[
{
"method": "createBufferedImage(int,int)",
"sub_hierarchy": [
{
"method": "createBufferedImage(int,int,org.jfree.chart.ChartRenderingInfo)",
"sub_hierarchy": [
{
"method": "createBufferedImage(int,int,int,org.jfree.chart.ChartRenderingInfo)",
"sub_hierarchy": []
}
]
}
]
},
...
]
```## NOTE (May change in the future)
- Only work with Java 11 projects.
- Only work with Maven projects.## Speacial Thanks
- [Spoon](https://github.com/INRIA/spoon)
- [pbadenski - call-hierarchy-printer](https://github.com/pbadenski/call-hierarchy-printer)