src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Invoke.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -28,22 +28,17 @@
import com.apple.jobjc.Coder.NSClassCoder;
import com.apple.jobjc.Coder.PrimitivePointerCoder;
import com.apple.jobjc.Coder.SELCoder;
import com.apple.jobjc.Coder.StructCoder;
-import javax.tools.annotation.GenerateNativeHeader;
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
public abstract class Invoke {
public abstract void invoke(NativeArgumentBuffer argBuf);
public abstract void invoke(NativeArgumentBuffer buffer, Struct retvalStruct);
//
- /* No native methods here, but the constants are needed in the supporting JNI code */
- @GenerateNativeHeader
public static final class FunCall extends Invoke{
static native void invoke(long cifPtr, long fxnPtr, long retValPtr, long argsPtr);
final long fxnPtr;
final CIF cif;
@@ -76,12 +71,10 @@
void invoke(final NativeArgumentBuffer argBuf, final long retValPtr) {
invoke(cif.cif.bufferPtr, fxnPtr, retValPtr, argBuf.buffer.bufferPtr);
}
}
- /* No native methods here, but the constants are needed in the supporting JNI code */
- @GenerateNativeHeader
public static final class MsgSend extends Invoke{
static{ System.load("/usr/lib/libobjc.dylib"); }
private static final long OBJC_MSG_SEND_FXN_PTR = new Function("objc_msgSend").fxnPtr;
private static final long OBJC_MSG_SEND_FPRET_FXN_PTR = new Function("objc_msgSend_fpret").fxnPtr;
@@ -163,12 +156,10 @@
throw new RuntimeException();
}
}
}
- /* No native methods here, but the constants are needed in the supporting JNI code */
- @GenerateNativeHeader
public static final class MsgSendSuper extends Invoke{
static{ System.load("/usr/lib/libobjc.dylib"); }
private static final long OBJC_MSG_SEND_SUPER_FXN_PTR = new Function("objc_msgSendSuper").fxnPtr;
private static final long OBJC_MSG_SEND_SUPER_STRET_FXN_PTR = new Function("objc_msgSendSuper_stret").fxnPtr;