- All Known Subinterfaces:
PeerableRecipient
- All Known Implementing Classes:
NSObject
public interface Recipient
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.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidforwardInvocation(long invocation) Handles the invocation of a method on the recipient.longmethodSignatureForSelector(long selector) Returns the method signature for a specified selector.booleanrespondsToSelector(long selector) Checks to see if this object responds to the specified selector.
-
Method Details
-
methodSignatureForSelector
long methodSignatureForSelector(long selector) Returns the method signature for a specified selector.- Parameters:
selector- The pointer to the selector to check.- Returns:
- Pointer to the NSMethodSignature object for the specified selector.
- See Also:
-
forwardInvocation
void forwardInvocation(long invocation) 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.- Parameters:
invocation- The NSInvocation object.- See Also:
-
respondsToSelector
boolean respondsToSelector(long selector) Checks to see if this object responds to the specified selector.- Parameters:
selector- a long.- Returns:
- True if the object responds to the specified selector.
-