|
Evaluating Software Design Patterns — the "Gang of Four" patterns implemented in Java 6 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.rode.thesis.singleton.SimpsonsFamilySequence.Instance
private static final class SimpsonsFamilySequence.Instance
An instance container class that when loaded will create
the SimpsonsFamilySequence
instance to use and return
from the SimpsonsFamilySequence.getFamily()
method.
The initialisation of the sequence is thread-safe as it utilises standard static initialisation.
Implementation notes:
This corresponds to the initialise-on-demand holder class idiom
described in [Bloch01, p.194].
Field Summary | |
---|---|
private static SimpsonsFamilySequence |
instance
The singleton instance. |
Constructor Summary | |
---|---|
private |
SimpsonsFamilySequence.Instance()
Private off-limit constructor. |
Method Summary |
---|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final SimpsonsFamilySequence instance
singleton
instance.
Not created until the SimpsonsFamilySequence.getFamily()
method is invoked.
Constructor Detail |
---|
private SimpsonsFamilySequence.Instance()
|
Gunni Rode / rode.dk | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |