@SuppressWarnings("unchecked") private static ObjCClass toObjCClass(Class<?>[] array, int index) { return array.length > index ? ObjCClass.getByType((Class<? extends ObjCObject>) array[index]) : null; }
private static ObjCClass getByNameNotLoaded(String objcClassName) { Class<? extends ObjCObject> cls = allNativeClasses.get(objcClassName); if (cls != null) { return getByType(cls); } cls = allNativeProtocolProxies.get(objcClassName); if (cls != null) { return getByType(cls); } cls = allCustomClasses.get(objcClassName); if (cls != null) { return getByType(cls); } return null; }
@SuppressWarnings("unchecked") protected ObjCSuper getSuper() { if (zuper == null) { Class<? extends ObjCObject> javaClass = (Class<? extends ObjCObject>) getClass().getSuperclass(); ObjCClass objCClass = ObjCClass.getByType(javaClass); while (objCClass.isCustom()) { javaClass = (Class<? extends ObjCObject>) javaClass.getSuperclass(); objCClass = ObjCClass.getByType(javaClass); } zuper = new ObjCSuper(this, objCClass); } return zuper; }
@MarshalsPointer public static long toNative(Class<? extends ObjCObject> o, long flags) { if (o == null) { return 0L; } ObjCClass c = ObjCClass.getByType(o); return c.getHandle(); } }
protected static <T extends NSObject> T alloc(Class<T> c) { long h = NSObject.alloc(ObjCClass.getByType(c)); return ObjCObject.toObjCObject(c, h, NSObject.FLAG_NO_RETAIN); }
public static ObjCClass getFromObject(ObjCObject id) { long handle = id.getHandle(); ObjCClass c = null; if (handle != 0L) { long classPtr = ObjCRuntime.object_getClass(handle); c = ObjCObject.getPeerObject(classPtr); } if (c != null) { return c; } return getByType(id.getClass()); }
public static void preparePrerollAds() { preparePrerollAds(ObjCClass.getByType(MPMoviePlayerController.class)); } /*</methods>*/
public static void prepareInterstitialAds() { prepareInterstitialAds(ObjCClass.getByType(UIViewController.class)); } /*</methods>*/
/*<ptr>*/public static class CIFilterPtr extends Ptr<CIFilter, CIFilterPtr> {}/*</ptr>*/ /*<bind>*/static { ObjCRuntime.bind(CIFilter.class); }/*</bind>*/
public static NSValue create(@ByVal CLLocationCoordinate2D coordinate) { return create(ObjCClass.getByType(NSValue.class), coordinate); } @Method(selector = "valueWithMKCoordinateSpan:")
public static NSValue create(@ByVal CMTimeRange timeRange) { return create(ObjCClass.getByType(NSValue.class), timeRange); } /**
public static NSValue create(@ByVal CGSize size) { return create(ObjCClass.getByType(NSValue.class), size); } @Method(selector = "valueWithCGRect:")
public static NSValue create(@ByVal CGRect rect) { return create(ObjCClass.getByType(NSValue.class), rect); } @Method(selector = "valueWithCGAffineTransform:")
public static NSValue create(@ByVal CGAffineTransform transform) { return create(ObjCClass.getByType(NSValue.class), transform); } @Method(selector = "valueWithUIEdgeInsets:")
public static NSValue create(@ByVal CMTime time) { return create(ObjCClass.getByType(NSValue.class), time); } /**
public static NSValue create(@ByVal UIEdgeInsets insets) { return create(ObjCClass.getByType(NSValue.class), insets); } /**
public static NSValue create(@ByVal SCNMatrix4 v) { return create(ObjCClass.getByType(NSValue.class), v); } /*</methods>*/
public static NSValue create(@ByVal CATransform3D t) { return create(ObjCClass.getByType(NSValue.class), t); } /*</methods>*/
public static NSValue create(@ByVal CGPoint point) { return create(ObjCClass.getByType(NSValue.class), point); } @Method(selector = "valueWithCGVector:")
/** * * @param data * @param options * @return * @since Available in iOS 7.0 and later. * @throws NSErrorException */ @WeaklyLinked public NSAttributedString(NSData data, NSAttributedStringDocumentAttributes options) throws NSErrorException { super((SkipInit) null); long h = NSObject.alloc(ObjCClass.getByType(NSAttributedString.class)); initObject(NSAttributedStringExtensions.init(ObjCObject.toObjCObject(NSAttributedString.class, h, NSObject.FLAG_NO_RETAIN), data, options, null)); } /**