On Nov 17, 2010, at 12:56 AM, John Rose wrote: > On Nov 17, 2010, at 12:35 AM, Mike Swingler wrote: > >> How are blocks mapped to interfaces? > > That is a pure guess on my part. Are they mapped to classes? -- John
Perhaps we have a little terminology mixup: by "blocks" I mean C and Objective-C closures supported on Mac OS X 10.6 and higher. We don't map blocks onto any native JVM type. We have support in the JavaNativeFoundation.framework for JNI developers to wrap java.lang.Runnables as blocks or NSInvocations, but that assumes you are already in JNI, and you are working with a native API that uses blocks (documentation forthcoming). We also have a Java API that allows you to dispatch Runnables on the native libdispatch queues: <http://developer.apple.com/library/mac/documentation/Java/Reference/JavaSE6_AppleExtensionsRef/api/index.html?com/apple/concurrent/Dispatch.html> Regards, Mike Swingler Java Engineering Apple Inc.