Plugin development: inspecting code

Hi, I’m creating a Gradle plugin that needs to inspect (and possibly change) sources. I wonder if Gradle has a tool to edit compilation.

If yes, can anyone give the documentation about it ? I didn’t find it.