DZone
Java Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Java Zone > Implementing Dynamic Binding in a Different Way

Implementing Dynamic Binding in a Different Way

Varun Nischal user avatar by
Varun Nischal
·
Sep. 21, 08 · Java Zone · Interview
Like (0)
Save
Tweet
4.54K Views

Join the DZone community and get the full member experience.

Join For Free

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() {
callImpl();
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();
anonUser.callImpl();
}
}

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.

Interesting..

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?

Binding (linguistics) intellij

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Debugging the Java Message Service (JMS) API Using Lightrun
  • Fintech and AI: Ways Artificial Intelligence Is Used in Finance
  • How To Use Cluster Mesh for Multi-Region Kubernetes Pod Communication
  • 6 Things Startups Can Do to Avoid Tech Debt

Comments

Java Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo