my dog learned polymorphism*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Help with reusing code from a Singleton class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Help with reusing code from a Singleton class" Watch "Help with reusing code from a Singleton class" New topic
Author

Help with reusing code from a Singleton class

Karen Gomes
Ranch Hand

Joined: Aug 25, 2003
Posts: 60
Hello,

I have a SingletonClass1 in one project of which some features I reuse in a 2nd project.

SingletonClass1:
some common methods
some common attributes
other methods/attributes

SingletonClass2:
some common methods from SingletonClass1
some common attributes SingletonClass1
other methods/attributes

However since I cant inherit from Singletonclass1, how do I resolve this issue? I can set Project1 as a dependency/library in project2.
So I wan to reuse this SingletonClass1.

I can refactor this code, however lot of code in Project1 and other projects use this SingletonClass1. So I want to make sure I use the best approach here.

Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help with reusing code from a Singleton class