Alpha-Version vom JAva COm Bridge (JACOB) Plug-In

Das Eclipse-Plugin http://jacob-project.wiki.sourceforge.net/Jacob+Gen+Plugin erlaubt über einen Menüeintrag einfach das Erzeugen von Stub-Code für den Zugriff auf Windows-DLLs.

 

JacobGenScreenShot.PNG

Der Generator geht einen interessanten Weg über Eclipse JET, wie es die Webseite erklärt:

The plug-in uses the old, JacobGen 0.7, c++ program (dll) which reads a Microsoft’s proprietary TLB file and writes out what it finds on stdout. From the information gathered the plug-in produces an ecore model based of what is found inside the TLB. At this point the plug-in has created a model of what’s inside the DLL file. I.E. what classes and enums exist. The plug-in uses Java Emitter Templates (JET) to generate java code based on the above ecore model. It also produces the java method bodies to automatically call JACOB methods with the correct parameters. This will create a strongly typed java proxy, via JACOB, into the windows DLL.
So to wrap up. The plug-in reads the TLB file (using the existing JacobGEN DLL), creates a model based on the TLB / DLL file, and then produces a java proxy. The JET generated classes are really a proxy into the DLL via JACOB. So the end result is a set of java classes hiding all JACOB internal knowledge.

Ähnliche Beiträge

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert