Android和反思 [英] Android and reflection

查看:156
本文介绍了Android和反思的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到的Andr​​oid支持反射IM pression。但是否真的?如何合理的会是依靠反射巨资?有什么处罚?

I get the impression that Android supports reflection. But does it really? How sensible would it be to rely on reflection heavily? What's the penalty?

推荐答案

Android支持的反思。

Android supports reflection.

一旦你已经有了一个原型运行,你可以基准,并确定你的瓶颈。

Once you've got a prototype running, you can benchmark and determine your bottlenecks.

如果它的反射,然后考虑尝试缓存接口,这样使它成为一个一次性的成本,而不是不断地重复解决相同的接口从同一个实例。

If its reflection, then consider trying to cache interfaces and such to make it a one-off cost, rather than continually resolving the same interfaces from the same instances repeatedly.

这篇关于Android和反思的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆