mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-11 03:13:32 +00:00
#1113 Add uml-reverse-mapper plugin
This commit is contained in:
1 parent
55769e9841
commit
0685a505d3
140 files changed
+7753
No files matched your search
@@ -0,0 +1,41 @@
|
||||
@startuml
|
||||
package com.iluwatar.servicelocator {
|
||||
class App {
|
||||
+ App()
|
||||
+ main(args : String[]) {static}
|
||||
}
|
||||
class InitContext {
|
||||
- LOGGER : Logger {static}
|
||||
+ InitContext()
|
||||
+ lookup(serviceName : String) : Object
|
||||
}
|
||||
interface Service {
|
||||
+ execute() {abstract}
|
||||
+ getId() : int {abstract}
|
||||
+ getName() : String {abstract}
|
||||
}
|
||||
class ServiceCache {
|
||||
- LOGGER : Logger {static}
|
||||
- serviceCache : Map<String, Service>
|
||||
+ ServiceCache()
|
||||
+ addService(newService : Service)
|
||||
+ getService(serviceName : String) : Service
|
||||
}
|
||||
class ServiceImpl {
|
||||
- LOGGER : Logger {static}
|
||||
- id : int
|
||||
- serviceName : String
|
||||
+ ServiceImpl(serviceName : String)
|
||||
+ execute()
|
||||
+ getId() : int
|
||||
+ getName() : String
|
||||
}
|
||||
class ServiceLocator {
|
||||
- serviceCache : ServiceCache {static}
|
||||
- ServiceLocator()
|
||||
+ getService(serviceJndiName : String) : Service {static}
|
||||
}
|
||||
}
|
||||
ServiceLocator --> "-serviceCache" ServiceCache
|
||||
ServiceImpl ..|> Service
|
||||
@enduml
|
||||
Reference in new issue
Block a user