常用函数
2018-02-11 本文已影响0人
ShutLove
- 获取当前类名
非静态方法:this.getClass().getName()
静态方法:Thread.currentThread().getStackTrace()[1].getClassName() - 获取当前方法名
Thread.currentThread().getStackTrace()[1].getMethodName() - 获取当前时间戳
毫秒:System.currentTimeMillis();
纳秒:System.nanoTime();