|
| Re: How to get the compilation unit produced by the compiler [message #830928 is a reply to message #830403] |
Wed, 28 March 2012 04:30  |
Satyam Kandula Messages: 444 Registered: July 2009 |
Senior Member |
|
|
The compilation unit that compiler produced is internal and it is exposed outside through the DOM/AST. Here are some internal ways to get hold of the internal CompilationUnit.
- If you use setResolveBindings(true) while creating the AST, the references to the internal CompilationUnit is still kept at DefaultBindingResolver#newAstToOldAst.
- Look at org.eclipse.jdt.internal.compiler.Compiler.compile(ICompilationUnit[]) and it's references and see if you want to call directly.
Note that internal types/methods are liable to change which could break your code.
|
|
|
Powered by
FUDForum. Page generated in 0.02883 seconds