SingletonDetector

UMLClass
Skill Seekers :: skill_seekers :: Analysis :: SingletonDetector

Description

Detects Singleton pattern. Singleton ensures a class has only one instance and provides global access. Detection: Surface (name contains 'Singleton'), Deep (private constructor + static instance method), Full (instance caching + thread safety checks). Supports Python new, Java synchronized getInstance(), JS module pattern.

Generalized Elements

Attributes

Visibility Name Type Description
public pattern_type str
public category str

Operations

Visibility Name Description
public detect_surface()
public detect_deep()
public detect_full()

Properties

Name Value
name SingletonDetector
stereotype null
visibility public
isAbstract false
isFinalSpecialization false
isLeaf false
isActive false

Relationships

Owned Elements

Diagrams