I have a large scale non-compiled project developed using Java and its frameworks like Spring and Spring Boot. This project has database interaction point like JDBC's connection.prepareStatement(sql)
. SQL passing to .prepareStatement()
can be a constant String, object or combination of both. I want to understand how I can parse those SQL sttements without executing the code or statically parsing (traversing). I want to build a tool with the help of available libraries if any which can help me to this.
I tried static analysis and was successful in parsing/resolving all those snippets, but doing it manually will cost to much time and this will be for every time when I have to perform this kind of task. Till now I am unable to find a way to build a tool for this purpose.