summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMethodSignature.java
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMethodSignature.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMethodSignature.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMethodSignature.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMethodSignature.java
new file mode 100644
index 0000000000..710c086582
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMethodSignature.java
@@ -0,0 +1,42 @@
+package org.eclipse.swt.internal.cocoa;
+
+public class NSMethodSignature extends NSObject {
+
+public NSMethodSignature() {
+ super();
+}
+
+public NSMethodSignature(int id) {
+ super(id);
+}
+
+public int frameLength() {
+ return OS.objc_msgSend(this.id, OS.sel_frameLength);
+}
+
+public int getArgumentTypeAtIndex(int idx) {
+ return OS.objc_msgSend(this.id, OS.sel_getArgumentTypeAtIndex_1, idx);
+}
+
+public boolean isOneway() {
+ return OS.objc_msgSend(this.id, OS.sel_isOneway) != 0;
+}
+
+public int methodReturnLength() {
+ return OS.objc_msgSend(this.id, OS.sel_methodReturnLength);
+}
+
+public int methodReturnType() {
+ return OS.objc_msgSend(this.id, OS.sel_methodReturnType);
+}
+
+public int numberOfArguments() {
+ return OS.objc_msgSend(this.id, OS.sel_numberOfArguments);
+}
+
+public static NSMethodSignature signatureWithObjCTypes(int types) {
+ int result = OS.objc_msgSend(OS.class_NSMethodSignature, OS.sel_signatureWithObjCTypes_1, types);
+ return result != 0 ? new NSMethodSignature(result) : null;
+}
+
+}