Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
研究快速日志记录实用程序方法。通常我会为此使用 Aspects,但在不支持该功能的 Android SDK 中工作。
我将如何使用反射以通用方式获取方法名称?
还有反射在java中的任何性能吗?
这样的事情可能会起作用:
Thread.currentThread().getStackTrace()[0].getMethodName()