KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Look into the following code: public class ClassA { private boolean ClassAattr = false; public ClassA() { ClassAHandler handler = new ClassAHandler(this); } } public class ClassAHandler extends GeneralHandler { ClassA ca = null; public ClassAHandler(ClassA classa) { this.ca = classa; } } I need to access ClassAattr on some ClassAHandler methods, among other attributes. Is there a way to do so without passing the origin class in the handler constructor. I don't really like how this solution "looks".
Tags (comma-separated)
Save Edits
Cancel