This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes OO, Patterns, UML and Refactoring and the fly likes Refactoring the Legacy java code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Refactoring the Legacy java code" Watch "Refactoring the Legacy java code" New topic
Author

Refactoring the Legacy java code

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1371
This Legacy class has two inner classes. It it good practice to use inner classes ? I am planning to refactor into more reusable one. Because inner classes are tightly coupled. I am plainning to put general stuff in Base class(Parent class) and specific stuff in Derived class(Child class) for reuability of general stuffs. Is it right approach or any specific design pattern ?


Public class A {

Class B {
// variable declarations
}


Class C extends Observer and implements ExceptionListener {

}


Class D extends Observer and implements MessageListener {

onMessage() {

}
}

// calls Class C and class D methods

}

Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Please describe the "objects". What will the "objects" do and what purpose will they serve? This information is required to accurately determine how to structure the "classes".
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1371
Objects are sending JMS messges to Middleware/MOM/ Messaging Broker produts.
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1371
Any update ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Refactoring the Legacy java code
 
Similar Threads
Casting
Exam cram(Mock)
Declaration N access control
Limiting Method Access
help me