This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Java in General and the fly likes Referencing an outer class from an inner class instance Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Referencing an outer class from an inner class instance" Watch "Referencing an outer class from an inner class instance" New topic
Author

Referencing an outer class from an inner class instance

Michael Labuschagne
Ranch Hand

Joined: May 08, 2007
Posts: 56

Having trouble understanding why it is exactly that I can't have a reference (this) to my outer class. Obviously because (this) now refers to the inner class, but is there a way around it?



Would I have to do something like this:



Surely there's a more logical way of referring to an outer class from an inner class instance??
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Referencing an outer class from an inner class instance
 
Similar Threads
Execute thread from another class?
Anonymous Inner Class
Double-standard for anonymous inner class extending directly from Object class
Referencing an outer class from an inner class instance
Modify a frame from an inner class