Due to the nature of the objc_msgSend* functions, they are not directly exposed in this binding. Advanced users with good understanding of the
complexity involved with using these functions, may access them via the getLibrary method:
SharedLibrary objc = ObjCRuntime.getLibrary();
long objc_msgSend = objc.getFunctionAddress("objc_msgSend");
// example usage
long NSThread = objc_getClass("NSThread");
long currentThread = invokePPP(NSThread, sel_getUid("currentThread"), objc_msgSend);
The safe way to use objc_msgSend in C code is to cast it to an appropriate function pointer. This is exactly what the JNI
class does. If a particular function signature is not available, LibFFI may be used to invoke it.
The functions not exposed are:
| Modifier and Type | Class and Description |
|---|---|
| public static class | ObjCRuntime.
Contains the function pointers loaded from the objc |
| Modifier and Type | Field and Description |
|---|---|
| public static final char | _C_ARY_B
Types. |
| public static final char | _C_ARY_E
Types. |
| public static final char | _C_ATOM
Types. |
| public static final char | _C_BFLD
Types. |
| public static final char | _C_BOOL
Types. |
| public static final char | _C_CHARPTR
Types. |
| public static final char | _C_CHR
Types. |
| public static final char | _C_CLASS
Types. |
| public static final char | _C_CONST
Types. |
| public static final char | _C_DBL
Types. |
| public static final char | _C_FLT
Types. |
| public static final char | _C_ID
Types. |
| public static final char | _C_INT
Types. |
| public static final char | _C_LNG
Types. |
| public static final char | _C_LNG_LNG
Types. |
| public static final char | _C_PTR
Types. |
| public static final char | _C_SEL
Types. |
| public static final char | _C_SHT
Types. |
| public static final char | _C_STRUCT_B
Types. |
| public static final char | _C_STRUCT_E
Types. |
| public static final char | _C_UCHR
Types. |
| public static final char | _C_UINT
Types. |
| public static final char | _C_ULNG
Types. |
| public static final char | _C_ULNG_LNG
Types. |
| public static final char | _C_UNDEF
Types. |
| public static final char | _C_UNION_B
Types. |
| public static final char | _C_UNION_E
Types. |
| public static final char | _C_USHT
Types. |
| public static final char | _C_VECTOR
Types. |
| public static final char | _C_VOID
Types. |
| public static final long | nil
Nil value. |
| public static final byte | NO
Boolean values. |
| private static final SharedLibrary | |
| public static final int | OBJC_ASSOCIATION_ASSIGN
Policies related to associative references. |
| public static final int | OBJC_ASSOCIATION_COPY
Policies related to associative references. |
| public static final int | OBJC_ASSOCIATION_COPY_NONATOMIC
Policies related to associative references. |
| public static final int | OBJC_ASSOCIATION_RETAIN
Policies related to associative references. |
| public static final int | OBJC_ASSOCIATION_RETAIN_NONATOMIC
Policies related to associative references. |
| public static final byte | YES
Boolean values. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description | |||||
|---|---|---|---|---|---|---|
| public static boolean | class_addIvar(long cls, ByteBuffer name, long size, byte alignment, ByteBuffer types)
Adds a new instance variable to a class. | |||||
| public static boolean | class_addIvar(long cls, CharSequence name, long size, byte alignment, CharSequence types)
Adds a new instance variable to a class. | |||||
| public static boolean | class_addMethod(long
the class to which to add a method cls, long a selector that specifies the name of the method being added name, long a function which is the implementation of the new method. The function must take at least two arguments – imp, ByteBuffer self and _cmd.an array of characters that describe the types of the arguments to the method. For possible values, see Objective-C Runtime Programming
Guide > Type Encodings in Objective-C Runtime Programming Guide. Since the function must take at least two arguments – types)self
and _cmd, the second and third characters must be “@:” (the first character is the return type).Adds a new method to a class with a given name and implementation. | |||||
| public static boolean | class_addMethod(long
the class to which to add a method cls, long a selector that specifies the name of the method being added name, long a function which is the implementation of the new method. The function must take at least two arguments – imp, CharSequence self and _cmd.an array of characters that describe the types of the arguments to the method. For possible values, see Objective-C Runtime Programming
Guide > Type Encodings in Objective-C Runtime Programming Guide. Since the function must take at least two arguments – types)self
and _cmd, the second and third characters must be “@:” (the first character is the return type).Adds a new method to a class with a given name and implementation. | |||||
| public static boolean | class_addProperty(long
the class to modify cls, ByteBuffer the name of the property name, ObjCPropertyAttribute.an array of property attributes attributesAdds a property to a class. | |||||
| public static boolean | class_addProperty(long
the class to modify cls, CharSequence the name of the property name, ObjCPropertyAttribute.an array of property attributes attributesAdds a property to a class. | |||||
| public static boolean | class_addProtocol(long
the class to modify cls, long the protocol to add to protocol)clsAdds a protocol to a class. | |||||
| public static boolean | class_conformsToProtocol(long
the class you want to inspect cls, long a protocol protocol)Returns a Boolean value that indicates whether a class conforms to a given protocol. | |||||
| public static PointerBuffer | Returns: an array of pointers of type Ivar describing the instance variables declared by the class. Any instance variables declared by superclasses are not included. The array contains*outCount pointers followed by a NULL terminator. You must free the array with free().
If the class declares no instance variables, or the class to inspect cls)Describes the instance variables declared by a class. | |||||
| public static PointerBuffer | Returns: an array of pointers of type Method describing the instance methods implemented by the class—any instance methods implemented by superclasses are not included. The array contains*outCount pointers followed by a NULL terminator. You must free the array with free().
If the class you want to inspect cls)Describes the instance methods implemented by a class. | |||||
| public static PointerBuffer | Returns: an array of pointers of typeobjc_property_t describing the properties declared by the class. Any properties declared by superclasses are not
included. The array contains *outCount pointers followed by a NULL terminator. You must free the array with free().
If the class you want to inspect cls)Describes the properties declared by a class. | |||||
| public static PointerBuffer | Returns: an array of pointers of type Protocol* describing the protocols adopted by the class. Any protocols adopted by superclasses or other protocols are not included. The array contains*outCount pointers followed by a NULL terminator. You must free the array with free().
If the class you want to inspect cls)Describes the protocols adopted by a class. | |||||
| public static long | Returns: an instance of the classclsthe class that you want to allocate an instance of cls, long an integer indicating the number of extra bytes to allocate. The additional bytes can be used to store additional instance variables beyond those
defined in the class definition. extraBytes)Creates an instance of a class, allocating memory for the class in the default malloc memory zone. | |||||
| public static long | Returns: a pointer to the Method data structure that corresponds to the implementation of the selector specified byname for the class specified by
cls, or NULL if the specified class or its superclasses do not contain a class method with the specified selector.a pointer to a class definition. Pass the class that contains the method you want to retrieve cls, long a pointer of type SEL. Pass the selector of the method you want to retrieve name)Returns a pointer to the data structure describing a given class method for a given class. | |||||
| public static long | Returns: a pointer to an Ivar data structure containing information about the class variable specified by namethe class definition whose class variable you wish to obtain cls, ByteBuffer the name of the class variable definition to obtain name)Returns the Ivar for a specified class variable of a given class. | |||||
| public static long | Returns: a pointer to an Ivar data structure containing information about the class variable specified by namethe class definition whose class variable you wish to obtain cls, CharSequence the name of the class variable definition to obtain name)Returns the Ivar for a specified class variable of a given class. | |||||
| public static String | Returns: a C string representing the name of the library containing thecls class.the class you are inquiring about cls)Returns the name of the dynamic library a class originated from. | |||||
| public static long | Returns: the method that corresponds to the implementation of the selector specified by aSelector for the class specified bycls, or NULL if the
specified class or its superclasses do not contain an instance method with the specified selector.the class you want to inspect cls, long the selector of the method you want to retrieve name)Returns a specified instance method for a given class. | |||||
| public static long | Returns: the size in bytes of instances of the classcls, or 0 if cls is Nila class object cls)Returns the size of instances of a class. | |||||
| public static long | Returns: a pointer to an Ivar data structure containing information about the instance variable specified by namethe class whose instance variable you wish to obtain cls, ByteBuffer the name of the instance variable definition to obtain name)Returns the Ivar for a specified instance variable of a given class. | |||||
| public static long | Returns: a pointer to an Ivar data structure containing information about the instance variable specified by namethe class whose instance variable you wish to obtain cls, CharSequence the name of the instance variable definition to obtain name)Returns the Ivar for a specified instance variable of a given class. | |||||
| public static String | Returns: a description of the Ivar layout forclsthe class to inspect cls)Returns a description of the Ivar layout for a given class. | |||||
| public static long | Returns: the function pointer that would be called if[object name] were called with an instance of the class, or NULL if cls is Nilthe class you want to inspect cls, long a selector name)Returns the function pointer that would be called if a particular message were sent to an instance of a class. | |||||
| public static String | Returns: the name of the class, or the empty string if cls is Nila class object cls)Returns the name of a class. | |||||
| public static long | Returns: a pointer of typeobjc_property_t describing the property, or NULL if the class does not declare a property with that name, or NULL if
cls is Nil.the class you want to inspect cls, ByteBuffer a C string. Pass the name of the instance variable whose value you wish to modify. name)Returns a property with a given name of a given class. | |||||
| public static long | Returns: a pointer of typeobjc_property_t describing the property, or NULL if the class does not declare a property with that name, or NULL if
cls is Nil.the class you want to inspect cls, CharSequence a C string. Pass the name of the instance variable whose value you wish to modify. name)Returns a property with a given name of a given class. | |||||
| public static long | Returns: the superclass of the class, or Nil if cls is a root class, or Nil if cls is Nila class object cls)Returns the superclass of a class. | |||||
| public static int | Returns: an integer indicating the version number of the class definitiona pointer to an Class data structure. Pass the class definition for which you wish to obtain the version cls)Returns the version number of a class definition. | |||||
| public static String | Returns: a description of the layout of the weak Ivars forclsthe class to inspect cls)Returns a description of the layout of weak Ivars for a given class. | |||||
| public static boolean | class_isMetaClass(long
a class object cls)Returns a Boolean value that indicates whether a class object is a metaclass. | |||||
| public static long | Returns: the previous implementation of the method identified byname for the class identified by clsthe class you want to modify cls, long a selector that identifies the method whose implementation you want to replace name, long the new implementation for the method identified by imp, ByteBuffer name for the class identified by clsan array of characters that describe the types of the arguments to the method. For possible values, see Objective-C Runtime Programming
Guide > Type Encodings in Objective-C Runtime Programming Guide. Since the function must take at least two arguments – types)self
and _cmd, the second and third characters must be “@:” (the first character is the return type).Replaces the implementation of a method for a given class. | |||||
| public static long | Returns: the previous implementation of the method identified byname for the class identified by clsthe class you want to modify cls, long a selector that identifies the method whose implementation you want to replace name, long the new implementation for the method identified by imp, CharSequence name for the class identified by clsan array of characters that describe the types of the arguments to the method. For possible values, see Objective-C Runtime Programming
Guide > Type Encodings in Objective-C Runtime Programming Guide. Since the function must take at least two arguments – types)self
and _cmd, the second and third characters must be “@:” (the first character is the return type).Replaces the implementation of a method for a given class. | |||||
| public static void | class_replaceProperty(long
the class to modify cls, ByteBuffer the name of the property name, ObjCPropertyAttribute.an array of property attributes attributesReplaces a property of a class. | |||||
| public static void | class_replaceProperty(long
the class to modify cls, CharSequence the name of the property name, ObjCPropertyAttribute.an array of property attributes attributesReplaces a property of a class. | |||||
| public static boolean | class_respondsToSelector(long
the class you want to inspect cls, long a selector name)Returns a Boolean value that indicates whether instances of a class respond to a particular selector. | |||||
| public static void | class_setIvarLayout(long
the class to modify cls, ByteBuffer the layout of the Ivars for layout)clsSets the Ivar layout for a given class. | |||||
| public static void | class_setIvarLayout(long
the class to modify cls, CharSequence the layout of the Ivars for layout)clsSets the Ivar layout for a given class. | |||||
| public static void | class_setVersion(long
a pointer to an Class data structure. Pass the class definition for which you wish to set the version cls, int the new version number of the class definition version)Sets the version number of a class definition. | |||||
| public static void | class_setWeakIvarLayout(long
the class to modify cls, ByteBuffer the layout of the weak Ivars for layout)clsSets the layout for weak Ivars for a given class. | |||||
| public static void | class_setWeakIvarLayout(long
the class to modify cls, CharSequence the layout of the weak Ivars for layout)clsSets the layout for weak Ivars for a given class. | |||||
| public static SharedLibrary | ||||||
| public static long | Returns: the block called byanImpthe IMP that calls this block anImp)Returns the block associated with an IMP that was created using | |||||
| public static long | Returns: the IMP that callsblock. You must dispose of the returned IMP using the function.the block that implements this method. The signature of block)block should be method_return_type ^(id self, self, method_args …). The
selector of the method is not available to block. block is copied with Block_copy().Creates a pointer to a function that calls the specified block when the method is called. | |||||
| public static boolean | imp_removeBlock(long
an IMP that was created using the anImp)imp_implementationWithBlock function.Disassociates a block from an IMP that was created using | |||||
| public static String | Returns: a C string containing the instance variable's namethe instance variable v)Returns the name of an instance variable. | |||||
| public static long | Returns: the offset ofvthe instance variable v)Returns the offset of an instance variable. | |||||
| public static String | Returns: a C string containing the instance variable's type encodingthe instance variable v)Returns the type string of an instance variable. | |||||
| public static String | Returns: a C string describing the type of the parameter at indexindex, or NULL if method has no parameter index index. You must free the
string with free().the method to inspect m, int the index of the parameter to inspect index)Returns a string describing a single parameter type of a method. | |||||
| public static String | Returns: a C string describing the return type. You must free the string with free().the method to inspect m)Returns a string describing a method's return type. | |||||
| public static void | method_exchangeImplementations(long
the method to exchange with second method m1, long the method to exchange with first method m2)Exchanges the implementations of two methods. | |||||
| public static void | method_getArgumentType(long
the method you want to inquire about m, int the index of the parameter you want to inquire about index, ByteBuffer the reference string to store the description dst)Returns by reference a string describing a single parameter type of a method. | |||||
| public static String | method_getArgumentType(long
the method you want to inquire about m, int the index of the parameter you want to inquire about index, long the maximum number of characters that can be stored in dst_len)dstReturns by reference a string describing a single parameter type of a method. | |||||
| public static long | Returns: a function pointer of type IMPthe method to inspect m)Returns the implementation of a method. | |||||
| public static long | Returns: a pointer of type SELthe method to inspect m)Returns the name of a method. | |||||
| public static int | Returns: an integer containing the number of arguments accepted by the given methoda pointer to a Method data structure. Pass the method in question. m)Returns the number of arguments accepted by a method. | |||||
| public static void | method_getReturnType(long
the method to inspect m, ByteBuffer the reference string to store the description dst)Returns by reference a string describing a method's return type. | |||||
| public static String | method_getReturnType(long
the method to inspect m, long the maximum number of characters that can be stored in dst_len)dstReturns by reference a string describing a method's return type. | |||||
| public static String | Returns: a C string. The string may beNULLthe method to inspect m)Returns a string describing a method's parameter and return types. | |||||
| public static long | Returns: the previous implementation of the methodthe method for which to set an implementation m, long the implemention to set to this method imp)Sets the implementation of a method. | |||||
| public static boolean | nclass_addIvar(long cls, long name, long size, byte alignment, long types)
Unsafe version of: | |||||
| public static boolean | ||||||
| public static boolean | nclass_addProperty(long cls, long name, long attributes, int
the number of attributes in attributeCount)attributesUnsafe version of: | |||||
| public static long | nclass_copyIvarList(long cls, long
on return, contains the length of the returned array. If outCount)outCount is NULL, the length is not returnedUnsafe version of: | |||||
| public static long | nclass_copyMethodList(long cls, long
on return, contains the length of the returned array. If outCount)outCount is NULL, the length is not returnedUnsafe version of: | |||||
| public static long | nclass_copyPropertyList(long cls, long
on return, contains the length of the returned array. If outCount)outCount is NULL, the length is not returnedUnsafe version of: | |||||
| public static long | nclass_copyProtocolList(long cls, long
on return, contains the length of the returned array. If outCount)outCount is NULL, the length is not returnedUnsafe version of: | |||||
| public static long | ||||||
| public static long | ||||||
| public static long | ||||||
| public static long | ||||||
| public static long | ||||||
| public static long | ||||||
| public static long | ||||||
| public static long | nclass_replaceMethod(long cls, long name, long imp, long types)
Unsafe version of: | |||||
| public static void | nclass_replaceProperty(long cls, long name, long attributes, int
the number of attributes in attributeCount)attributesUnsafe version of: | |||||
| public static void | ||||||
| public static void | ||||||
| public static long | ||||||
| public static long | ||||||
| public static long | ||||||
| public static long | ||||||
| public static void | nmethod_getArgumentType(long m, int index, long dst, long
the maximum number of characters that can be stored in dst_len)dstUnsafe version of: | |||||
| public static void | nmethod_getReturnType(long m, long dst, long
the maximum number of characters that can be stored in dst_len)dstUnsafe version of: | |||||
| public static long | ||||||
| public static long | nobjc_allocateClassPair(long superclass, long name, long extraBytes)
Unsafe version of: | |||||
| public static long | ||||||
| public static long | ||||||
| public static long | nobjc_copyClassList(long
an integer pointer used to store the number of classes returned by this function in the list. This parameter may be outCount)nilUnsafe version of: | |||||
| public static long | nobjc_copyClassNamesForImage(long image, long
the number of names in the returned array outCount)Unsafe version of: | |||||
| public static long | nobjc_copyImageNames(long
the number of names in the returned array outCount)Unsafe version of: | |||||
| public static long | nobjc_copyProtocolList(long
upon return, contains the number of protocols in the returned array outCount)Unsafe version of: | |||||
| public static long | ||||||
| public static int | nobjc_getClassList(long buffer, int
the number of pointers for which you have allocated space in buffer. On return, this function fills in only this number of elements. If this number
is less than the number of registered classes, this function returns an arbitrary subset of the registered classes. bufferCount)Unsafe version of: | |||||
| public static long | ||||||
| public static long | ||||||
| public static long | ||||||
| public static long | ||||||
| public static long | ||||||
| public static void | nobjc_setEnumerationMutationHandler(long handler)
Unsafe version of: | |||||
| public static long | ||||||
| public static long | ||||||
| public static long | nobject_getInstanceVariable(long obj, long name, long outValue)
Unsafe version of: | |||||
| public static long | nobject_setInstanceVariable(long obj, long name, long value)
Unsafe version of: | |||||
| public static long | nproperty_copyAttributeList(long property, long
the number of attributes returned in the array outCount)Unsafe version of: | |||||
| public static long | nproperty_copyAttributeValue(long property, long attributeName)
Unsafe version of: | |||||
| public static long | ||||||
| public static long | ||||||
| public static void | nprotocol_addMethodDescription(long proto, long name, long types, boolean isRequiredMethod, boolean isInstanceMethod)
Unsafe version of: | |||||
| public static void | nprotocol_addProperty(long proto, long name, long attributes, int
the number of properties in attributeCount, boolean isRequiredProperty, boolean isInstanceProperty)attributesUnsafe version of: | |||||
| public static long | nprotocol_copyMethodDescriptionList(long p, boolean isRequiredMethod, boolean isInstanceMethod, long
upon return, contains the number of method description structures in the returned array outCount)Unsafe version of: | |||||
| public static long | nprotocol_copyPropertyList(long proto, long
upon return, contains the number of elements in the returned array outCount)Unsafe version of: | |||||
| public static long | nprotocol_copyProtocolList(long proto, long
upon return, contains the number of elements in the returned array outCount)Unsafe version of: | |||||
| public static native void | nprotocol_getMethodDescription(long p, long aSel, boolean isRequiredMethod, boolean isInstanceMethod, long __functionAddress, long __result)
Unsafe version of: | |||||
| public static void | nprotocol_getMethodDescription(long p, long aSel, boolean isRequiredMethod, boolean isInstanceMethod, long __result)
Unsafe version of: | |||||
| public static long | ||||||
| public static long | nprotocol_getProperty(long proto, long name, boolean isRequiredProperty, boolean isInstanceProperty)
Unsafe version of: | |||||
| public static long | ||||||
| public static long | ||||||
| public static long | ||||||
| public static long | Returns: the new class, or Nil if the class could not be created (for example, the desired name is already in use)the class to use as the new class's superclass, or Nil to create a new root class superclass, ByteBuffer the string to use as the new class's name. The string will be copied. name, long the number of bytes to allocate for indexed ivars at the end of the class and metaclass objects. This should usually be 0. extraBytes)Creates a new class and metaclass. | |||||
| public static long | Returns: the new class, or Nil if the class could not be created (for example, the desired name is already in use)the class to use as the new class's superclass, or Nil to create a new root class superclass, CharSequence the string to use as the new class's name. The string will be copied. name, long the number of bytes to allocate for indexed ivars at the end of the class and metaclass objects. This should usually be 0. extraBytes)Creates a new class and metaclass. | |||||
| public static long | objc_allocateProtocol(ByteBuffer
the name of the protocol you want to create name)Creates a new protocol instance. | |||||
| public static long | objc_allocateProtocol(CharSequence
the name of the protocol you want to create name)Creates a new protocol instance. | |||||
| public static long | objc_constructInstance(long
the class that you want to allocate an instance of cls, ByteBuffer the location at which to allocate an instance of the bytes)cls class. bytes must point to at least class_getInstanceSize(cls)
bytes of well-aligned, zero-filled memory.Creates an instance of a class at the specified location. | |||||
| public static PointerBuffer | Returns: anil terminated array of classes. You must free the array with free()Creates and returns a list of pointers to all registered class definitions. | |||||
| public static PointerBuffer | Returns: an array of C strings representing all of the class names within the specified library or frameworkthe library or framework you are inquiring about image)Returns the names of all the classes within a specified library or framework. | |||||
| public static PointerBuffer | Returns: an array of C strings representing all of the class names within the specified library or frameworkthe library or framework you are inquiring about image)Returns the names of all the classes within a specified library or framework. | |||||
| public static PointerBuffer | Returns: an array of C strings representing the names of all the loaded Objective-C frameworks and dynamic librariesReturns the names of all the loaded Objective-C frameworks and dynamic libraries. | |||||
| public static PointerBuffer | Returns: a C array of all the protocols known to the runtime. The array contains*outCount pointers followed by a NULL terminator. You must free the
list with free().Returns an array of all the protocols known to the runtime. | |||||
| public static long | objc_destructInstance(long
the instance to destroy obj)Destroys an instance of a class without freeing memory and removes any of its associated references. | |||||
| public static void | objc_disposeClassPair(long
the class to be destroyed. This class must have been allocated using cls)objc_allocateClassPair.Destroys a class and its associated metaclass. | |||||
| public static void | objc_enumerationMutation(long
the object being mutated obj)Inserted by the compiler when a mutation is detected during a foreach iteration. | |||||
| public static long | Returns: the value associated with the keykey for object.the source object for the association object, long the key for the association key)Returns the value associated with a given object for a given key. | |||||
| public static long | Returns: the Class object for the named class, ornil if the class is not registered with the Objective-C runtimethe name of the class to look up name)Returns the class definition of a specified class. | |||||
| public static long | Returns: the Class object for the named class, ornil if the class is not registered with the Objective-C runtimethe name of the class to look up name)Returns the class definition of a specified class. | |||||
| public static int | Returns: an integer value indicating the total number of registered classesan array of Class values. On output, each Class value points to one class definition, up to either buffer)bufferCount or the total number of
registered classes, whichever is less. You can pass NULL to obtain the total number of registered class definitions without actually retrieving
any class definitions.Obtains the list of registered class definitions. | |||||
| public static long | Returns: the Class object for the metaclass of the named class, ornil if the class is not registered with the Objective-C runtimethe name of the class to look up name)Returns the metaclass definition of a specified class. | |||||
| public static long | Returns: the Class object for the metaclass of the named class, ornil if the class is not registered with the Objective-C runtimethe name of the class to look up name)Returns the metaclass definition of a specified class. | |||||
| public static long | Returns: the protocol namedname{, or NULL if no protocol named name could be foundthe name of a protocol name)Returns a specified protocol. | |||||
| public static long | Returns: the protocol namedname{, or NULL if no protocol named name could be foundthe name of a protocol name)Returns a specified protocol. | |||||
| public static long | Returns: the Class object for the named classthe name of the class to look up name)Returns the class definition of a specified class. | |||||
| public static long | Returns: the Class object for the named classthe name of the class to look up name)Returns the class definition of a specified class. | |||||
| public static long | objc_loadWeak(PointerBuffer
the address of the weak pointer location)Loads the object referenced by a weak pointer and returns it. | |||||
| public static long | Returns: the Class object for the named class, ornil if the class is not registered with the Objective-C runtimethe name of the class to look up name)Returns the class definition of a specified class. | |||||
| public static long | Returns: the Class object for the named class, ornil if the class is not registered with the Objective-C runtimethe name of the class to look up name)Returns the class definition of a specified class. | |||||
| public static void | objc_registerClassPair(long
the class you want to register cls)Registers a class that was allocated using | |||||
| public static void | objc_registerProtocol(long
the protocol you want to register with the Objective-C runtime proto)Registers a newly created protocol with the Objective-C runtime. | |||||
| public static void | objc_removeAssociatedObjects(long
an object that maintains associated objects object)Removes all associations for a given object. | |||||
| public static void | objc_setAssociatedObject(long
the source object for the association object, long the key for the association key, long value, long the policy for the association. One of: policy)
Sets an associated value for a given object using a given key and association policy. | |||||
| public static void | objc_setEnumerationMutationHandler(EnumerationMutationHandlerI
a function pointer to the new mutation handler handler)Sets the current mutation handler. | |||||
| public static long | Returns: the value stored in location (that is,obj)the address of the weak pointer location, long the new object you want the weak pointer to now point to obj)Stores a new value in a | |||||
| public static long | Returns: a copy of objan Objective-C object obj, long the size of the object size)objReturns a copy of a given object. | |||||
| public static long | Returns: nilan Objective-C object obj)Frees the memory occupied by a given object. | |||||
| public static long | ||||||
| public static String | Returns: the name of the class of whichobj is an instancean Objective-C object obj)Returns the class name of a given object. | |||||
| public static long | Returns: a pointer to any extra bytes allocated withobj. If obj was not allocated with any extra bytes, then dereferencing the returned pointer
is undefined.an Objective-C object obj)This function returns a pointer to any extra bytes allocated with the instance (as specified by | |||||
| public static long | Returns: a pointer to the Ivar data structure that defines the type and name of the instance variable specified by namea pointer to an instance of a class. Pass the object containing the instance variable whose value you wish to obtain obj, ByteBuffer a C string. Pass the name of the instance variable whose value you wish to obtain name, PointerBuffer on return, contains a pointer to the value of the instance variable outValue)Obtains the value of an instance variable of a class instance. | |||||
| public static long | Returns: a pointer to the Ivar data structure that defines the type and name of the instance variable specified by namea pointer to an instance of a class. Pass the object containing the instance variable whose value you wish to obtain obj, CharSequence a C string. Pass the name of the instance variable whose value you wish to obtain name, PointerBuffer on return, contains a pointer to the value of the instance variable outValue)Obtains the value of an instance variable of a class instance. | |||||
| public static long | object_getIvar(long
the object containing the instance variable whose value you want to read obj, long the Ivar describing the instance variable whose value you want to read ivar)Reads the value of an instance variable in an object. | |||||
| public static long | ||||||
| public static long | Returns: a pointer to the Ivar data structure that defines the type and name of the instance variable specified by namea pointer to an instance of a class. Pass the object containing the instance variable whose value you wish to modify obj, ByteBuffer a C string. Pass the name of the instance variable whose value you wish to modify name, ByteBuffer the new value for the instance variable value)Changes the value of an instance variable of a class instance. | |||||
| public static long | Returns: a pointer to the Ivar data structure that defines the type and name of the instance variable specified by namea pointer to an instance of a class. Pass the object containing the instance variable whose value you wish to modify obj, CharSequence a C string. Pass the name of the instance variable whose value you wish to modify name, ByteBuffer the new value for the instance variable value)Changes the value of an instance variable of a class instance. | |||||
| public static void | object_setIvar(long
the object containing the instance variable whose value you want to set obj, long the Ivar describing the instance variable whose value you want to set ivar, long the new value for the instance variable value)Sets the value of an instance variable in an object. | |||||
| public static ObjCPropertyAttribute. | Returns: an array of property attributes. You must free the array with free().the property whose attributes you want to copy property)Returns an array of property attributes for a given property. | |||||
| public static String | Returns: The value string of theattributeName attribute, if one exists in property; otherwise, nil. You must free the returned value string
with free().the property whose value you are interested in property, ByteBuffer a C string representing the name of the attribute attributeName)Returns the value of a property attribute given the attribute name. | |||||
| public static String | Returns: The value string of theattributeName attribute, if one exists in property; otherwise, nil. You must free the returned value string
with free().the property whose value you are interested in property, CharSequence a C string representing the name of the attribute attributeName)Returns the value of a property attribute given the attribute name. | |||||
| public static String | Returns: a C string containing the property's attributesa property property)Returns the attribute string of a property. | |||||
| public static String | Returns: a C string containing the property's namethe property you want to inquire about property)Returns the name of a property. | |||||
| public static void | protocol_addMethodDescription(long
the protocol you want to add a method to proto, long the name of the method you want to add name, ByteBuffer a C string representing the signature of the method you want to add types, boolean isRequiredMethod, boolean isInstanceMethod)Adds a method to a protocol. | |||||
| public static void | protocol_addMethodDescription(long
the protocol you want to add a method to proto, long the name of the method you want to add name, CharSequence a C string representing the signature of the method you want to add types, boolean isRequiredMethod, boolean isInstanceMethod)Adds a method to a protocol. | |||||
| public static void | protocol_addProperty(long
the protocol you want to add a property to proto, ByteBuffer the name of the property you want to add. name, ObjCPropertyAttribute.an array of property attributes attributes,Adds a property to a protocol that is under construction. | |||||
| public static void | protocol_addProperty(long
the protocol you want to add a property to proto, CharSequence the name of the property you want to add. name, ObjCPropertyAttribute.an array of property attributes attributes,Adds a property to a protocol that is under construction. | |||||
| public static void | protocol_addProtocol(long
the protocol you want to add the registered protocol to proto, long the registered protocol you want to add to addition)protoAdds a registered protocol to another protocol that is under construction. | |||||
| public static boolean | protocol_conformsToProtocol(long
a protocol proto, long a protocol other)Returns a Boolean value that indicates whether one protocol conforms to another protocol. | |||||
| public static ObjCMethodDescription. | Returns: a C array of objc_method_description structures containing the names and types ofp's methods specified by isRequiredMethod and
isInstanceMethod. The array contains *outCount pointers followed by a NULL terminator. You must free the list with free().
If the protocol declares no methods that meet the specification, a protocol p, boolean a Boolean value that indicates whether returned methods should be required methods (pass isRequiredMethod, boolean YES to specify required methods)a Boolean value that indicates whether returned methods should be instance methods (pass isInstanceMethod)YES to specify instance methods)Returns an array of method descriptions of methods meeting a given specification for a given protocol. | |||||
| public static PointerBuffer | Returns: a C array of pointers of type objc_property_t describing the properties declared byproto. Any properties declared by other protocols adopted
by this protocol are not included. The array contains *outCount pointers followed by a NULL terminator. You must free the array with free().
If the protocol declares no properties, a protocol proto)Returns an array of the properties declared by a protocol. | |||||
| public static PointerBuffer | Returns: a C array of protocols adopted byproto. The array contains *outCount pointers followed by a NULL terminator. You must free the array
with free().
If the protocol declares no properties, a protocol proto)eturns an array of the protocols adopted by a protocol. | |||||
| public static ObjCMethodDescription | protocol_getMethodDescription(long
a protocol p, long a selector aSel, boolean a Boolean value that indicates whether isRequiredMethod, boolean aSel is a required methoda Boolean value that indicates whether isInstanceMethod, ObjCMethodDescription aSel is a instance methodan objc_method_description structure that describes the method specified by __result)aSel, isRequiredMethod, and isInstanceMethod for
the protocol p.
If the protocol does not contain the specified method, returns an objc_method_description structure with the value Returns a method description structure for a specified method of a given protocol. | |||||
| public static String | Returns: the name of the protocolp as a C stringa protocol p)Returns a the name of a protocol. | |||||
| public static long | Returns: the property specified byname, isRequiredProperty, and isInstanceProperty for proto, or NULL if none of
proto's properties meets the specificationa protocol proto, ByteBuffer the name of a property name, boolean a Boolean value that indicates whether isRequiredProperty, boolean name is a required propertya Boolean value that indicates whether isInstanceProperty)name is a instance propertyReturns the specified property of a given protocol. | |||||
| public static long | Returns: the property specified byname, isRequiredProperty, and isInstanceProperty for proto, or NULL if none of
proto's properties meets the specificationa protocol proto, CharSequence the name of a property name, boolean a Boolean value that indicates whether isRequiredProperty, boolean name is a required propertya Boolean value that indicates whether isInstanceProperty)name is a instance propertyReturns the specified property of a given protocol. | |||||
| public static boolean | protocol_isEqual(long
a protocol proto, long a protocol other)Returns a Boolean value that indicates whether two protocols are equal. | |||||
| public static String | Returns: a C string indicating the name of the selectora pointer of type SEL. Pass the selector whose name you wish to determine. sel)Returns the name of the method specified by a given selector. | |||||
| public static long | Returns: a pointer of type SEL specifying the selector for the named methoda pointer to a C string. Pass the name of the method you wish to register str)Registers a method name with the Objective-C runtime system. | |||||
| public static long | Returns: a pointer of type SEL specifying the selector for the named methoda pointer to a C string. Pass the name of the method you wish to register str)Registers a method name with the Objective-C runtime system. | |||||
| public static boolean | sel_isEqual(long
the selector to compare with lhs, long rhsthe selector to compare with rhs)lhsReturns a Boolean value that indicates whether two selectors are equal. | |||||
| public static long | Returns: a pointer of type SEL specifying the selector for the named methoda pointer to a C string. Pass the name of the method you wish to register str)Registers a method with the Objective-C runtime system, maps the method name to a selector, and returns the selector value. | |||||
| public static long | Returns: a pointer of type SEL specifying the selector for the named methoda pointer to a C string. Pass the name of the method you wish to register str)Registers a method with the Objective-C runtime system, maps the method name to a selector, and returns the selector value. |