Here's an idea:
If you want a different version of the singleton class for each "environment", use a static Map to hold the reference to the class instance for each environment.
No idea how to...
Type: Posts; User: Norm
Here's an idea:
If you want a different version of the singleton class for each "environment", use a static Map to hold the reference to the class instance for each environment.
No idea how to...
The singleton needs a place to keep a reference to the single instance it defines.
A static is one way. Perhaps there are other places to keep the single reference.
Are you talking about disk files copied into another disk file (like a jar)
or about the bytes of a class file loaded into the jvm where they can be executed.
What is it that is "copied"? And...
What do you mean by "deploy" an instance?
Are you loading all of the classes for an application in the same JVM?