File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 1373
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: 1373
Objects are sending JMS messges to Middleware/MOM/ Messaging Broker produts.
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1373
Any update ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Refactoring the Legacy java code