Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Class names issue

 
Cristian Cardenas
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have a class which .class name is $clase.class and by decompiling it, I saw that the name in the source code was _cls$clase. Why the names are different. Which is the trick?
Thanks.
Cristian.
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Usually, a $ in the name of a .class file indicates a nested or inner class, either named or anonymous.
 
Cristian Cardenas
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, but, usually the name of .class in nested classes is parent$child.class
In this case the name inside the .java file (source code) is _cls$Base and the name of the .class file is $Base.class
Here it's the source code resulting after decompile a $Base.class file:
class _cls$Base{
..............
..............
..............
}
Thanks.
Critian
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't ever used a decompiler, so I don't know exactly what is going on. Sorry that I can't be of much help here.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic