• Post Reply Bookmark Topic Watch Topic
  • New Topic

Name mangling in java  RSS feed

 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did a search on the topic's heading, in google, and the only results i got was on how java used the $ symbol to name the inner classes. However what i was interested in was how java used name mangling to differentiate between different overloaded methods. Does java use that feature at all or does it use its own method of maintaining method signatures ?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java doesn't use classic "name mangling" because that technique is a way to get a classical, non-object-oriented linker to link a C++ program. When you compile a class file, Java does include a "method descriptor" for each method, which you can read about here. Method calls are compiled to use those same method descriptors for lookup.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cool ! Thanks. That had me puzzled for a while.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!