
ca.weblite.objc.Recipient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-objc-bridge Show documentation
Show all versions of java-objc-bridge Show documentation
A thin bridge that allows for two-way communication from Java to Objective-C.
package ca.weblite.objc;
/**
* An interface for an object that can receive messages from the Objective-C
* runtime. In order to receive messages, the object should be passed to the
* RuntimeUtils.createProxy() method.
*
* The NSObject class is a concrete implementation of this interface that
* contains all of the plumbing necessary to operate in the world of the
* Objective-C runtime. It is probably best to just subclass NSObject rather
* than implement your own Recipient class.
*
* @author shannah
* @see NSObject
* @see NSProxy Class Reference
* @version $Id: $Id
* @since 1.1
*/
public interface Recipient {
/**
* Returns the method signature for a specified selector.
*
* @param selector The pointer to the selector to check.
* @return Pointer to the NSMethodSignature object for the specified selector.
* @see NSMethodSignature Class Reference
* @see forwardInvocation: Method reference (from NSProxy)
*/
public long methodSignatureForSelector(long selector);
/**
* Handles the invocation of a method on the recipient. Typically this should
* either be handled by a java method, or routed to some parent object that
* is being proxied.
*
* @param invocation The NSInvocation object.
* @see NSInvocation Class Reference
* @see forwardInvocation: Method reference (from NSProxy)
* @see NSObject#methodSignatureForSelector(long) For a concrete imlementation.
*/
public void forwardInvocation(long invocation);
/**
* Checks to see if this object responds to the specified selector.
*
* @param selector a long.
* @return True if the object responds to the specified selector.
*/
public boolean respondsToSelector(long selector);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy