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.
| Visibility | Name | Type | Description |
|---|---|---|---|
| public | pattern_type | str | |
| public | category | str |
| Visibility | Name | Description |
|---|---|---|
| public | detect_surface() | |
| public | detect_deep() | |
| public | detect_full() |
| Name | Value |
|---|---|
| name | SingletonDetector |
| stereotype | null |
| visibility | public |
| isAbstract | false |
| isFinalSpecialization | false |
| isLeaf | false |
| isActive | false |