• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ObjCRuntime类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.moe.natj.objc.ObjCRuntime的典型用法代码示例。如果您正苦于以下问题:Java ObjCRuntime类的具体用法?Java ObjCRuntime怎么用?Java ObjCRuntime使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ObjCRuntime类属于org.moe.natj.objc包,在下文中一共展示了ObjCRuntime类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: download

import org.moe.natj.objc.ObjCRuntime; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void download(String path, final long bytesLimit, DownloadCallback<byte[]> callback)
{
    firStorage().child(path).dataWithMaxSizeCompletion(bytesLimit, new FIRStorageReference.Block_dataWithMaxSizeCompletion() {
        @Override
        public void call_dataWithMaxSizeCompletion(NSData arg0, NSError arg1)
        {
            if (ErrorHandler.handleDownloadError(arg1, callback)) return;
            ObjCRuntime.autoreleasepool(new Runnable() { // TODO - check this autorelease pool
                @Override
                public void run()
                {
                    int length = (int) arg0.length();
                    byte[] data = new byte[length];
                    arg0.bytes().getBytePtr().copyTo(data);
                    callback.onSuccess(data);
                }
            });
        }
    });
}
 
开发者ID:mk-5,项目名称:gdx-fireapp,代码行数:25,代码来源:Storage.java


示例2: setRepositoryTableView

import org.moe.natj.objc.ObjCRuntime; //导入依赖的package包/类
@Generated
public void setRepositoryTableView(UITableView value) {
    Object __old = repositoryTableView();
    if (value != null) {
        org.moe.natj.objc.ObjCRuntime.associateObjCObject(this, value);
    }
    setRepositoryTableView_unsafe(value);
    if (__old != null) {
        org.moe.natj.objc.ObjCRuntime.dissociateObjCObject(this, __old);
    }
}
 
开发者ID:SnowdogApps,项目名称:MoeSampleApp,代码行数:12,代码来源:RepositoryListViewController.java


示例3: setRemoteMessageDelegate

import org.moe.natj.objc.ObjCRuntime; //导入依赖的package包/类
@Generated
public void setRemoteMessageDelegate(
		@Mapped(ObjCObjectMapper.class) FIRMessagingDelegate value) {
	Object __old = remoteMessageDelegate();
	if (value != null) {
		org.moe.natj.objc.ObjCRuntime.associateObjCObject(this, value);
	}
	setRemoteMessageDelegate_unsafe(value);
	if (__old != null) {
		org.moe.natj.objc.ObjCRuntime.dissociateObjCObject(this, __old);
	}
}
 
开发者ID:mk-5,项目名称:gdx-fireapp,代码行数:13,代码来源:FIRMessaging.java


示例4: processPrimitiveData

import org.moe.natj.objc.ObjCRuntime; //导入依赖的package包/类
/**
 * Transforms ios object to java primitive type object.
 * TODO - better docs.
 *
 * @param data       Object instance to be transformed.
 * @param wantedType Type of object which should be returned after transformation.
 * @param <T>        Generic type of wanted data.
 * @return Transformed object.  If {@link NSObject} instance has passed object was transformed - otherwise {@code data} itself was returned.
 */
@SuppressWarnings("unchecked")
public static <T> T processPrimitiveData(Object data, Class<T> wantedType)
{
    T result = null;
    if (data.getClass() == wantedType) {
        return (T) data;
    }
    if (data instanceof NSNumber) {
        if (wantedType == Long.class) {
            result = (T) Long.valueOf(((NSNumber) data).longValue());
        } else if (wantedType == Integer.class) {
            result = (T) Integer.valueOf(((NSNumber) data).intValue());
        } else if (wantedType == Float.class) {
            result = (T) Float.valueOf(((NSNumber) data).floatValue());
        } else if (wantedType == Double.class) {
            result = (T) Double.valueOf(((NSNumber) data).doubleValue());
        } else if (wantedType == Boolean.class) {
            result = (T) Boolean.valueOf(((NSNumber) data).boolValue());
        }
    } else if (data instanceof NSString) {
        result = (T) ObjCRuntime.createJavaString(((NSString) data).getPeerPointer());
    } else {
        throw new RuntimeException("" + data.getClass() + " is not primitive data");
    }
    return result;
}
 
开发者ID:mk-5,项目名称:gdx-fireapp,代码行数:36,代码来源:DataProcessor.java


示例5: setDelegate

import org.moe.natj.objc.ObjCRuntime; //导入依赖的package包/类
@Generated
public void setDelegate(
		@Mapped(ObjCObjectMapper.class) GADAdLoaderDelegate value) {
	Object __old = delegate();
	if (value != null) {
		org.moe.natj.objc.ObjCRuntime.associateObjCObject(this, value);
	}
	setDelegate_unsafe(value);
	if (__old != null) {
		org.moe.natj.objc.ObjCRuntime.dissociateObjCObject(this, __old);
	}
}
 
开发者ID:TomGrill,项目名称:gdx-firebase,代码行数:13,代码来源:GADAdLoader.java


示例6: setDelegate

import org.moe.natj.objc.ObjCRuntime; //导入依赖的package包/类
@Generated
public void setDelegate(
		@Mapped(ObjCObjectMapper.class) GADInterstitialDelegate value) {
	Object __old = delegate();
	if (value != null) {
		org.moe.natj.objc.ObjCRuntime.associateObjCObject(this, value);
	}
	setDelegate_unsafe(value);
	if (__old != null) {
		org.moe.natj.objc.ObjCRuntime.dissociateObjCObject(this, __old);
	}
}
 
开发者ID:TomGrill,项目名称:gdx-firebase,代码行数:13,代码来源:GADInterstitial.java


示例7: setInAppPurchaseDelegate

import org.moe.natj.objc.ObjCRuntime; //导入依赖的package包/类
@Generated
@Deprecated
public void setInAppPurchaseDelegate(
		@Mapped(ObjCObjectMapper.class) GADInAppPurchaseDelegate value) {
	Object __old = inAppPurchaseDelegate();
	if (value != null) {
		org.moe.natj.objc.ObjCRuntime.associateObjCObject(this, value);
	}
	setInAppPurchaseDelegate_unsafe(value);
	if (__old != null) {
		org.moe.natj.objc.ObjCRuntime.dissociateObjCObject(this, __old);
	}
}
 
开发者ID:TomGrill,项目名称:gdx-firebase,代码行数:14,代码来源:GADInterstitial.java


示例8: setAdSizeDelegate

import org.moe.natj.objc.ObjCRuntime; //导入依赖的package包/类
@Generated
public void setAdSizeDelegate(
		@Mapped(ObjCObjectMapper.class) GADAdSizeDelegate value) {
	Object __old = adSizeDelegate();
	if (value != null) {
		org.moe.natj.objc.ObjCRuntime.associateObjCObject(this, value);
	}
	setAdSizeDelegate_unsafe(value);
	if (__old != null) {
		org.moe.natj.objc.ObjCRuntime.dissociateObjCObject(this, __old);
	}
}
 
开发者ID:TomGrill,项目名称:gdx-firebase,代码行数:13,代码来源:GADSearchBannerView.java


示例9: setAdChoicesView

import org.moe.natj.objc.ObjCRuntime; //导入依赖的package包/类
@Generated
public void setAdChoicesView(GADAdChoicesView value) {
	Object __old = adChoicesView();
	if (value != null) {
		org.moe.natj.objc.ObjCRuntime.associateObjCObject(this, value);
	}
	setAdChoicesView_unsafe(value);
	if (__old != null) {
		org.moe.natj.objc.ObjCRuntime.dissociateObjCObject(this, __old);
	}
}
 
开发者ID:TomGrill,项目名称:gdx-firebase,代码行数:12,代码来源:GADNativeContentAdView.java


示例10: setAdvertiserView

import org.moe.natj.objc.ObjCRuntime; //导入依赖的package包/类
@Generated
public void setAdvertiserView(UIView value) {
	Object __old = advertiserView();
	if (value != null) {
		org.moe.natj.objc.ObjCRuntime.associateObjCObject(this, value);
	}
	setAdvertiserView_unsafe(value);
	if (__old != null) {
		org.moe.natj.objc.ObjCRuntime.dissociateObjCObject(this, __old);
	}
}
 
开发者ID:TomGrill,项目名称:gdx-firebase,代码行数:12,代码来源:GADNativeContentAdView.java


示例11: setBodyView

import org.moe.natj.objc.ObjCRuntime; //导入依赖的package包/类
@Generated
public void setBodyView(UIView value) {
	Object __old = bodyView();
	if (value != null) {
		org.moe.natj.objc.ObjCRuntime.associateObjCObject(this, value);
	}
	setBodyView_unsafe(value);
	if (__old != null) {
		org.moe.natj.objc.ObjCRuntime.dissociateObjCObject(this, __old);
	}
}
 
开发者ID:TomGrill,项目名称:gdx-firebase,代码行数:12,代码来源:GADNativeContentAdView.java


示例12: setCallToActionView

import org.moe.natj.objc.ObjCRuntime; //导入依赖的package包/类
@Generated
public void setCallToActionView(UIView value) {
	Object __old = callToActionView();
	if (value != null) {
		org.moe.natj.objc.ObjCRuntime.associateObjCObject(this, value);
	}
	setCallToActionView_unsafe(value);
	if (__old != null) {
		org.moe.natj.objc.ObjCRuntime.dissociateObjCObject(this, __old);
	}
}
 
开发者ID:TomGrill,项目名称:gdx-firebase,代码行数:12,代码来源:GADNativeContentAdView.java


示例13: setHeadlineView

import org.moe.natj.objc.ObjCRuntime; //导入依赖的package包/类
@Generated
public void setHeadlineView(UIView value) {
	Object __old = headlineView();
	if (value != null) {
		org.moe.natj.objc.ObjCRuntime.associateObjCObject(this, value);
	}
	setHeadlineView_unsafe(value);
	if (__old != null) {
		org.moe.natj.objc.ObjCRuntime.dissociateObjCObject(this, __old);
	}
}
 
开发者ID:TomGrill,项目名称:gdx-firebase,代码行数:12,代码来源:GADNativeContentAdView.java


示例14: setImageView

import org.moe.natj.objc.ObjCRuntime; //导入依赖的package包/类
@Generated
public void setImageView(UIView value) {
	Object __old = imageView();
	if (value != null) {
		org.moe.natj.objc.ObjCRuntime.associateObjCObject(this, value);
	}
	setImageView_unsafe(value);
	if (__old != null) {
		org.moe.natj.objc.ObjCRuntime.dissociateObjCObject(this, __old);
	}
}
 
开发者ID:TomGrill,项目名称:gdx-firebase,代码行数:12,代码来源:GADNativeContentAdView.java


示例15: setLogoView

import org.moe.natj.objc.ObjCRuntime; //导入依赖的package包/类
@Generated
public void setLogoView(UIView value) {
	Object __old = logoView();
	if (value != null) {
		org.moe.natj.objc.ObjCRuntime.associateObjCObject(this, value);
	}
	setLogoView_unsafe(value);
	if (__old != null) {
		org.moe.natj.objc.ObjCRuntime.dissociateObjCObject(this, __old);
	}
}
 
开发者ID:TomGrill,项目名称:gdx-firebase,代码行数:12,代码来源:GADNativeContentAdView.java


示例16: setMediaView

import org.moe.natj.objc.ObjCRuntime; //导入依赖的package包/类
@Generated
public void setMediaView(GADMediaView value) {
	Object __old = mediaView();
	if (value != null) {
		org.moe.natj.objc.ObjCRuntime.associateObjCObject(this, value);
	}
	setMediaView_unsafe(value);
	if (__old != null) {
		org.moe.natj.objc.ObjCRuntime.dissociateObjCObject(this, __old);
	}
}
 
开发者ID:TomGrill,项目名称:gdx-firebase,代码行数:12,代码来源:GADNativeContentAdView.java


示例17: setDelegate

import org.moe.natj.objc.ObjCRuntime; //导入依赖的package包/类
@Generated
public void setDelegate(
		@Mapped(ObjCObjectMapper.class) GADNativeAdDelegate value) {
	Object __old = delegate();
	if (value != null) {
		org.moe.natj.objc.ObjCRuntime.associateObjCObject(this, value);
	}
	setDelegate_unsafe(value);
	if (__old != null) {
		org.moe.natj.objc.ObjCRuntime.dissociateObjCObject(this, __old);
	}
}
 
开发者ID:TomGrill,项目名称:gdx-firebase,代码行数:13,代码来源:GADNativeAd.java


示例18: setRootViewController

import org.moe.natj.objc.ObjCRuntime; //导入依赖的package包/类
@Generated
public void setRootViewController(UIViewController value) {
	Object __old = rootViewController();
	if (value != null) {
		org.moe.natj.objc.ObjCRuntime.associateObjCObject(this, value);
	}
	setRootViewController_unsafe(value);
	if (__old != null) {
		org.moe.natj.objc.ObjCRuntime.dissociateObjCObject(this, __old);
	}
}
 
开发者ID:TomGrill,项目名称:gdx-firebase,代码行数:12,代码来源:GADNativeAd.java


示例19: setNativeAd

import org.moe.natj.objc.ObjCRuntime; //导入依赖的package包/类
@Generated
public void setNativeAd(GADNativeAd value) {
	Object __old = nativeAd();
	if (value != null) {
		org.moe.natj.objc.ObjCRuntime.associateObjCObject(this, value);
	}
	setNativeAd_unsafe(value);
	if (__old != null) {
		org.moe.natj.objc.ObjCRuntime.dissociateObjCObject(this, __old);
	}
}
 
开发者ID:TomGrill,项目名称:gdx-firebase,代码行数:12,代码来源:GADMediaView.java


示例20: setDelegate

import org.moe.natj.objc.ObjCRuntime; //导入依赖的package包/类
@Generated
public void setDelegate(
		@Mapped(ObjCObjectMapper.class) GADDebugOptionsViewControllerDelegate value) {
	Object __old = delegate();
	if (value != null) {
		org.moe.natj.objc.ObjCRuntime.associateObjCObject(this, value);
	}
	setDelegate_unsafe(value);
	if (__old != null) {
		org.moe.natj.objc.ObjCRuntime.dissociateObjCObject(this, __old);
	}
}
 
开发者ID:TomGrill,项目名称:gdx-firebase,代码行数:13,代码来源:GADDebugOptionsViewController.java



注:本文中的org.moe.natj.objc.ObjCRuntime类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java NonPositiveDefiniteMatrixException类代码示例发布时间:2022-05-23
下一篇:
Java StreamUser类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap