1 message in net.java.dev.jna.usersJava 5 features to make JNA prettier?
FromSent OnAttachments
Charles Oliver NutterSep 2, 2007 12:43 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Java 5 features to make JNA prettier?Actions...
From:Charles Oliver Nutter (char@sun.com)
Date:Sep 2, 2007 12:43:55 pm
List:net.java.dev.jna.users

There seems to be a number of Java 5 features that could make the JNA experience a bit nicer. For example, varargs:

public void invoke(Object... arguments);

...

chmod = NativeLibrary.getInstance("c").getFunction("chmod") chmod.invoke("filename", ###)

and limited use of generics:

public static <T> T loadLibrary(String name, Class<T> libraryIfc);

...

POSIX posix = Native.loadLibrary("c", Posix.class)

Of course I would certainly understand if JNA is intended to be usable by folks on Java 1.4, but these add some minor nicities that would probably be welcomed by folks on Java 5. Thoughts?

- Charlie