android getSystemService(String s) - 反射?

发布于 01-05 00:42 字数 209 浏览 1 评论 0原文

我的问题涉及android开发。我想知道方法 context.getSystemService(String s) 是否使用反射。那里 在 Context 类中定义了许多 static String 常量。我不确定这个方法背后的机制是如何工作的。这就是我问的原因。

My question concerns the android development. I would like to know if the method context.getSystemService(String s) uses reflection. There
are many static String constants defined within the Context class. I'm not sure how the mechanism behind this method works. Thats why I'm asking.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

我不咬妳我踢妳2025-01-12 00:42:26

查看代码 这里,看起来它只是使用equals()检查s的值是什么,并返回一个适当的值.
所以,那里没有反射。

Looking at the code here, it seems like it just checks what the value of s is, using equals() and returns an appropriate value.
So, no Reflection there.

农村范ル2025-01-12 00:42:26

无论如何使用它都不会出现任何反射

There will not be any reflection use it any way

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文