[Kde-java] Qt and KDE java package names

Richard Dale Richard_Dale at tipitina.demon.co.uk
Sun Aug 24 19:20:27 CEST 2003


On Sunday 24 August 2003 13:11, Mark Wielaard wrote:
> Hi,
>
> On Mon, 2003-08-11 at 13:25, Gert-Jan van der Heiden wrote:
> > > With java 1.5 we might be able to use meta data to indicate which void
> > > methods are slots in a class, and that would allow some more checking.
> >
> > That would be cleaner. Let's hope GCJ add's meta data soon.
>
> Is there a public description of this?
> The only thing I could quickly find was JSR 175, but since that goes
> through the JCP process we have to wait if this ever really becomes a
> specification that will be available freely (without some
> -click-through- license). I wouldn't count on gcj supporting this soon.
Yes, I don't know why they have to be so secretive. I've only found vague 
descriptions in articles about the Java 1.5 enhancements. In the case of 
QtJava slot methods would be denoted with a '@slot' metadata tag. I don't 
know whether the metadata tags are comma seperated or not. I assume there 
will be some extra reflection methods to retrieve the metadata on a method, 
but I haven't read about them.

@slot public void mySlot(int arg1, QWidget arg2) {
..
}

Signals are just type signatures in QtJava, so they can be embodied in a 
<class name>Signals.java interface:

public interface QMenuBarSignals {
	void activated(int itemId);
	void highlighted(int itemId);
}

One way of representing slots would be to generate a <class name>Slots.java 
interface like the Signals one. But if the metadata feature is coming it 
would be better to wait for that, as opposed implementing the *Slots.java 
interface idea now and end up with backwards compatibility problems. 

-- Richard


More information about the Kde-java mailing list