[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [jdt-core-dev] Using JDT Core for Bytecode Generation
|
Hi, Matt. Probably the best forum is the eclipse.tools.jdt newsgroup.
The jdt-core-dev mailing list is mainly for people who are working on
JDT, as opposed to clients of JDT.
That said, I will be surprised if you can go from a jdt.core.dom to a
.class file. AFAIK, our class file generation is not based on the
public DOM, it's based on internal (non-API) classes that the DOM is
just the public representation of. That's how come the Eclipse Java
compiler can be packaged as a jar (ecj.jar) that does not require the
rest of the Eclipse framework (IResource, etc.) to run. Perhaps
building up a DOM AST also causes the necessary internal AST to be
constructed fully enough to generate classes, but I wouldn't assume so.
Anyway, it's a good question for eclipse.tools.jdt.
-Walter Harley
JDT APT team
-----Original Message-----
From: jdt-core-dev-bounces@xxxxxxxxxxx
[mailto:jdt-core-dev-bounces@xxxxxxxxxxx] On Behalf Of Matt Fowles
Sent: Thursday, March 27, 2008 7:13 AM
To: jdt-core-dev@xxxxxxxxxxx
Subject: [jdt-core-dev] Using JDT Core for Bytecode Generation
All~
Apologies is this is not quite the right place for this message. If it
is not, pointers to a better place would be appreciated.
I have been looking into using jdt.core.dom as a step towards direct
bytecode generation. My current setup has a hand rolled java dom that I
then serialize to java code which I compile using javac. I have found
that I can replace my java dom with the jdt.core one and still do the
serialize/compile trick. But, I would really like to be able to skip
the serialize step and go directly from jdt.core.dom to a .class file.
I have been scouring the API Reference for jdt.core but have not yet
turned up anything. I feel like I am probably just missing some key
section of the documentation. Pointers to it or a comment on the
feasibility of this plan would be much appreciated.
Thanks,
Matt