Android and reflection

前端 未结 5 959
臣服心动
臣服心动 2020-12-13 13:48

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?

5条回答
  •  情书的邮戳
    2020-12-13 13:59

    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.

提交回复
热议问题