Thanks for the reply. I understand that the $ sign is normally used to denote a nested/inner class.
In the above example (ActivityThread.java - http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/app/ActivityThread.java;h=d8161936a44d10ac1fac01fecb583c76190b1730;hb=76eef491e1a453174f6372d18cf500d13521fb23 ) android.app.ActivityThread$H.handleMessage Refers to the H class, which is nested in ActivityThread.java: 1621 private final class H extends Handler {....} However, as for at android.app.ActivityThread.handleDestroyActivity (ActivityThread.java:3180) at android.app.ActivityThread.access$2500(ActivityThread.java:115) at android.app.ActivityThread$H.handleMessage(ActivityThread.java: 1745) I still don't understand fully what it can mean. Looking at the source code (line number a bit off due to diff. version): (in function H.handleMessage) 1723 case DESTROY_ACTIVITY: 1724 handleDestroyActivity((IBinder)msg.obj, msg.arg1 != 0, 1725 msg.arg2, false); 1726 break; This is the section of interest. So I get ActivityThread $H.handleMessage (handleMessage function of class H nested inside ActivityThread). However, I don't get ActivityThread.access$2500 for a couple reasons: 1. Line number points to beginning of the ActivityClass 2. ActivityThread.access seems to refer to a function name, but there's no "access" function 3. access$2500 (so is access a function or class) and I have no idea what the number 2500 means 4. I would also like to know how the number 2500 is generated (is it random? depends on task #?) I tried using DDMS on a similar code, thinking that maybe (IBinder) msg.obj casting is referring to it. But when I stepped through a similar code (object casting), I didn't see "access$2500" or anything similar to it. It just jumped straight on to the function being called. I tried googling it, but to no avail... On 8월25일, 오후1시08분, Streets Of Boston <flyingdutc...@gmail.com> wrote: > The $ is used to seperate the inner class from the main class; > > Example: > > packager a.b.c > > public class MyClass { > ... > static class OtherClass { > void someMethod() { > ... > exception.printStackTrace(); > ... > } > ... > } > ... > > } > > would print out as ' at a.b.c.MyClass$OtherClass.someMethod > (MyClass.java:322)' > > I'm not sure about the '2500'. It could be an anonymous class..? > > public void accessExample() { > Runnable r = new Runnable() { > public void run() { ... } > }; > ... > } > > where the class of the instance 'r' is anonymous and compiled as > '2500'. > > On Aug 25, 11:47 am, Brian <brianlee8...@gmail.com> wrote: > > > > > Hi all, > > > I wanted to understand what the $ sign and the number after a $ sign > > meant in a backtrace. > > > For example, consider the following backtrace: > > > at android.app.ActivityThread.access$2500(ActivityThread.java:115) > > at android.app.ActivityThread$H.handleMessage(ActivityThread.java: > > 1745) > > > In the first line, what does the number 2500 refer to? In addition, I > > couldn't find the function "access" in ActivityThread.java, and line > > 115 is just the beginning of the class. Can anyone help clarify this? > > Thanks!- 원본 텍스트 숨기기 - > > - 원본 텍스트 보기 - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---