• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Help with reusing code from a Singleton class

Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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

some common methods
some common attributes
other methods/attributes

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.

brevity is the soul of wit - shakepeare. Tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic