[Kde-bindings] Dynamic Proxy/SMOKE lib based java bindings code gen progress
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Wed Feb 18 13:24:45 UTC 2004
I've updated the '-fjava' option of the kalyptus tool to generate the same
java api as the JNI based one '-fjni' in the KDE 3.2 release. I've attached
the generated QFont.java source as an example.
To look at the rest of the generated code, edit
kdebindings/smoke/kde/generate.pl.in and change the '-fsmoke' option passed
to kalyptus to '-fjava' (or '-fjni' to generate the JNI ones). Then configure
kdebindings with a '--with-smoke=kde' option, and it will generate the
sources in the smoke/kde directory.
This is an example of a proxy being created:
private static Object _static_proxy = null;
static {
_static_proxy = Proxy.newProxyInstance(QFont.class.getClassLoader(),
new Class[] { QFontProxyInterface.class },
new SmokeInvocation() );
}
I think that this code would be better off encapsulated in a factory method,
eg qtjava.createProxy().
This is an interesting discussion of the dynaop AOP framework, and as
comparison with other AOP approaches:
http://weblogs.java.net/pub/wlg/1001
It would be nice to add AOP facilties in the style of Nanning or dynaop, as
the way these proxy based aop frameworks are structured is very similar to
the proxy based bindings.
-- Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QFont.java
Type: text/x-java
Size: 12847 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20040218/f07529cf/attachment.java>
More information about the Kde-bindings
mailing list