|
|
||
Varun Nischal's BlogImplementing Dynamic Binding while Coding?Posted by n_varun on August 21, 2008 at 07:14 AM | Comments (4)Few weeks back, I had blogged at my other blog, about "Getting your basics right?". I don't know how many of you would agree, however the discussion that took place for filing an RFE, which eventually got filed as Issue #142112, was a long lasting one, and if people had clarity of concepts, then it might not have extended that long. Anyways, I think you would like to comment on that. Read my blog for more details. Here's the Usecase, which was sufficient to justify the filing of a RFE.
6 public class UserImpl implements User {
7
8 public void callCheck() {
9 callImpl();
10 new UserImpl().callImpl();
11 }
12
13 public void callImpl() {
14 System.out.println("Implementation Invoked...");
15 }
16
17 public static void main(String[] args) {
18 new UserImpl().callCheck();
19
20 // Dynamic Binding...
21 User anonUser = new UserImpl();
22 anonUser.callImpl();
23 }
24 }
25
26 interface User {
27
28 public void callImpl();
29 };
Clicking on callImpl() in line #22, doesn't navigate to the implemented version of callImpl(), i.e. line #13. Instead, user is navigated to line #28. So, this should not exist, hence someone filed a RFE. Thanks for your time! Bookmark blog post: CommentsComments are listed in date ascending order (oldest first) | Post Comment
| ||
|
|