[cfe-dev] Java bindings for clang/libclang?

Kevin Kelley kevin at kelleysoft.com
Tue Nov 29 15:32:14 PST 2011


On 11/29/2011 3:51 PM, Nathan Ridge wrote:
> I am wondering whether there exist Java bindings for libclang, or some other
> way to access the clang API from Java code (other than using JNI directly - I'm
> thinking of something like a Java wrapper library, possibly implemented using
> JNI)?

You can use the Oliver Chafik JNAerator/Bridj project to auto-generate a 
bindings class
from the clang and llvm headers.  The generated classes could use some 
refactoring and
cleanup, and I'm working on making a clean set of wrappers out of it.  
But with a little
effort you can get it to work as-is.


Kevin




More information about the cfe-dev mailing list