Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » com.sun.tools.javac.jvm.ClassWriter equivalent in JDT compiler
com.sun.tools.javac.jvm.ClassWriter equivalent in JDT compiler [message #1714495] Fri, 13 November 2015 03:33 Go to next message
Eclipse UserFriend
Hi,

What the class responsible for writing class file for the JDTCompiler?
The class(es) equivalent to javac's com.sun.tools.javac.jvm.ClassWriter?

Thank you

[Updated on: Fri, 13 November 2015 03:34] by Moderator

Re: com.sun.tools.javac.jvm.ClassWriter equivalent in JDT compiler [message #1715177 is a reply to message #1714495] Thu, 19 November 2015 15:16 Go to previous messageGo to next message
Eclipse UserFriend
I don't know about com.sun.tools.javac.jvm.ClassWriter, but here are some pointers to class file writing in JDT:

Main protocol is org.eclipse.jdt.internal.compiler.ICompilerRequestor: called when compilation is done for one type. There are several implementations depending on the compilation mode, e.g., during batch compilation org.eclipse.jdt.internal.compiler.batch.BatchCompilerRequestor is used which calls back into org.eclipse.jdt.internal.compiler.batch.Main.outputClassFiles(CompilationResult).
Within the IDE other requestors are used, just look at the type hierarchy of ICompilerRequestor.

Note that the above assumes, we already have the bytes, only need to write them to file. If instead you are looking for the class that assembles the byte array, have a look at org.eclipse.jdt.internal.compiler.codegen.CodeStream.

HTH,
Stephan
Re: com.sun.tools.javac.jvm.ClassWriter equivalent in JDT compiler [message #1715185 is a reply to message #1715177] Thu, 19 November 2015 18:53 Go to previous message
Eclipse UserFriend
Great Thanks Stephan, That's what I needed
Previous Topic:JDTCompilerAdapter jars and method called for invoking compilation
Next Topic:Why dosen't Eclipse made by Swing?
Goto Forum:
  


Current Time: Tue Jul 29 16:12:34 EDT 2025

Powered by FUDForum. Page generated in 0.05378 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top