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

Nathan Ridge zeratul976 at hotmail.com
Wed Nov 30 08:46:17 PST 2011


> > 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.

Cool! Would you be interested in sharing that once it's finished?

Thanks to everyone else for your suggestions too. I wasn't aware of these easier
alternatives to JNI, I will definitely look into them.

Nate

 		 	   		  



More information about the cfe-dev mailing list