Implementing Dynamic Binding in a Different Way

DZone 's Guide to

Implementing Dynamic Binding in a Different Way

· Java Zone ·
Free Resource

A few weeks back I blogged about "Getting your basics right?" I don't know how many of you agreed with it, however the discussion that took place for filing an RFE, which eventually got filed as Issue #142112, was quite long. If people had understood the issue from the start, it might not have gone on for that long. Anyway, if you would like to comment on it, please read my blog for the details, then go ahead and comment on the issue.

Here's the use case, which was sufficient to justify the filing of the RFE:

 public class UserImpl implements User {

public void callCheck() {
new UserImpl().callImpl();

public void callImpl() {
System.out.println("Implementation Invoked...");

public static void main(String[] args) {
new UserImpl().callCheck();

// Dynamic Binding...
User anonUser = new UserImpl();

interface User {

public void callImpl();

Clicking on callImpl() in line #17 doesn't navigate to the implemented version of callImpl(), i.e. line #08. Instead the user is navigated to line #23. So, this is not how things should be, hence someone filed the RFE. 

What's happening?

Actually, this code was written for the NetBeans IDE Java Editor, and people who were involved in this discussion were taking the IntelliJ IDEA Java Editor as their reference for filing the RFE in NetBeans Issuezilla.


So now one needs dynamic binding while code is being written, which is interesting. As you know, NetBeans IDE provides many features to help the user code. Features such as Mark Occurences, Inline Refactoring, Goto Implementation, and many more...

But do we really need dynamic binding to take place? If somehow implemented, what impact would it have on the performance of NetBeans IDE?


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}