ObjCObjectMapper¶
Fields¶
proxy2addr¶
-
public Map<Object, WeakReference>
proxy2addr
¶ Collection for caching the created Objective-C proxy objects.
Methods¶
cleanupObjCProxy¶
createStrongBindingPointer¶
-
public static Pointer
createStrongBindingPointer
(long peer, boolean owned)¶ Creates a strong binding pointer to an Objective-C object.
Retains if doing so is needed to keep the strong ownership.
Parameters: - peer – The pointer
- owned – If this is false, the pointer objects will be retained
Returns: The created
Pointer
object
dispose¶
getNativePeerOfProxyedObject¶
toJava¶
-
public Object
toJava
(long peer, JavaObjectConstructionInfo info)¶ Creates Java objects from Objective-C objects.
For
NativeObject
s this will use the Java instances associated with the Objective-C objects. If there are no references, then this will create newNativeObject
s, and associate them with the Objective-C objects. For strings this will forward toObjCStringMapper
. For blocks this will forward toObjCCallbackMapper
.For proxies it will return the the Java instances associated with the Objective-C proxy objects.
toNative¶
-
public long
toNative
(Object instance, NativeObjectConstructionInfo info)¶ Creates Objective-C objects from Java objects.
For
NativeObject
s this will only return their peers. For strings this will forward toObjCStringMapper
. For every other cases this will generate proxy classes with usingclass2addr
as cache for Objective-C classes, and instance them with usingproxy2addr
as a cache for instantiations.