@startuml NonDerivableSingleton <-left[hidden]- BaseSingleton BaseSingleton <|-- DerivedSingleton class NonDerivableSingleton { {static} -instance : NonDerivableSingleton* {static} +GetInstance() : NonDerivableSingleton* -NonDerivableSingleton() } class BaseSingleton { {static} -instance : BaseSingleton* {static} -registry : Map __ {static} +GetInstance() : BaseSingleton* #BaseSingleton() .. {static} #Register(String, BaseSingleton*) {static} #LookUp(String) : BaseSingleton* } class DerivedSingleton { {static} -instance : DerivedSingleton* {static} +GetInstance() : DerivedSingleton* #DerivedSingleton() } note left of DerivedSingleton DerivedSingleton::DerivedSingleton() { BaseSingleton::Register("DerivedSingleton", this); } end note @enduml