This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: proposal: move Kawa from Subversion to git on gitlab.com
On 11/12/2016 08:41 PM, Jamison Hope wrote:
Re MethodHandles, I use Kawa on some computers at work that are stuck
with RHEL 6 + Java 6, so please don't break it!
Noted!
One idea I had is to define a fake MethodHandle class:
public class CallContext {
....
/* #ifndef use:java.lang.invoke */
// public static abstract class MethodHandle {
// public abstract Object invokeExact(Procedure proc, CallContext ctx);
// };
/* #endif */
}
And in code that uses it:
/* #ifdef use:java.lang.invoke */
import java.lang.invoke.Methodhandle;
/* #else */
// import gnu.mapping.CallContext.MethodHandle;
/* #endif */
It's rather gross but it reduces the places where PreProcessing
conditionals would be needed to clutter up the code.
(Actual typedefs would be cleaner.)
A concrete class that extends CallContext.MethodHandle might
use reflection, but it could also be compiler-generated.
--
--Per Bothner
per@bothner.com http://per.bothner.com/