[讨论] java中获取任何任何一个线程栈上对象的方法

xiaoxia19920920 2016-02-28

如下所示为一个线程的堆栈信息,

android.os.TransactionTooLargeException: null
android.os.BinderProxy.transact(Native Method)
android.content.pm.IPackageManager$Stub$Proxy.getPackageInfo(IPackageManager.java:1343)
android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:72)
android.webkit.WebViewClassic$1.doInBackground(WebViewClassic.java:1682)
android.webkit.WebViewClassic$1.doInBackground(WebViewClassic.java:1674)
android.os.AsyncTask$2.call(AsyncTask.java:287)
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
java.util.concurrent.FutureTask.run(FutureTask.java:137)
android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) 
java.lang.Thread.run(Thread.java:856) 

 能否拿到第13行Thread对象、第12行ThreadPoolExecutor$Worker对象、第9行FutureTask对象的实例呢?

 

 

Global site tag (gtag.js) - Google Analytics