/*******************************************************************************
 * Copyright (c) 2007 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
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;
}

}
