You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a class, the InnerClasses bytecode attribute contains (among others) names of all its member classes. They can be recognized by outer_class_info_index being != 0. If that outer_class_info_index points to the "current" class, we know it is "our" member class. The name of the member class can be found using inner_name_index.
Names (as in, DotNames) of all member classes could be stored in the ClassInfo and serialized. That would allow, in addition to current navigation from a class to its enclosing class, also navigating from a class to its member classes.
Open questions:
If I have a bunch of classes like this
classA {
classB {
classC {
}
}
}
What should A's set of member classes contain? Only B, or B and C? I'd say just B. If you want C, you should navigate to it from B.
Member class names in bytecode are stored in a simple form. So if I have a class com.example.A which has a member class B, we know its name is B. Do we want to return a full name of com.example.A$B? I'd say yes, it's actually pretty simple to create a componentized name of this form.
What about local classes and anonymous classes? I'd say we can just ignore them, at least for now.
The text was updated successfully, but these errors were encountered:
For a class, the
InnerClasses
bytecode attribute contains (among others) names of all its member classes. They can be recognized byouter_class_info_index
being!= 0
. If thatouter_class_info_index
points to the "current" class, we know it is "our" member class. The name of the member class can be found usinginner_name_index
.Names (as in,
DotName
s) of all member classes could be stored in theClassInfo
and serialized. That would allow, in addition to current navigation from a class to its enclosing class, also navigating from a class to its member classes.Open questions:
If I have a bunch of classes like this
What should
A
's set of member classes contain? OnlyB
, orB
andC
? I'd say justB
. If you wantC
, you should navigate to it fromB
.Member class names in bytecode are stored in a simple form. So if I have a class
com.example.A
which has a member classB
, we know its name isB
. Do we want to return a full name ofcom.example.A$B
? I'd say yes, it's actually pretty simple to create a componentized name of this form.What about local classes and anonymous classes? I'd say we can just ignore them, at least for now.
The text was updated successfully, but these errors were encountered: