/
githubmirror
/
java-design-patterns
Обзор
Документация
Войти
/
githubmirror
/
java-design-patterns
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
context-object/etc/context-object.urm.puml
50 строк
1 KB
Chak-C
feature: Add context object pattern (#2304)
29 дек 2022, 12:17
Не верифицирован
29 дек 2022, 12:17
e223459
Код
Авторство
О чём код?
@startuml package com.iluwatar.context.object { class App { - LOGGER : Logger {static} + App() + main(args : String[]) {static} } class ServiceContext { - ACCOUNT_SERVICE : String - SESSION_SERVICE : String - SEARCH_SERVICE : String + ServiceContext() + getACCOUNT_SERVICE() : String + getSESSION_SERVICE() : String + getSEARCH_SERVICE() : String + setACCOUNT_SERVICE(service : String) + setSESSION_SERVICE(service : String) + setSEARCH_SERVICE(service : String) } class ServiceContextFactory { + ServiceContextFactory() + createContext() : ServiceContext } class LayerA { - context : ServiceContext + LayerA() + getContext() : ServiceContext + addAccountInfo() } class LayerB { - context : ServiceContext + LayerB(layerA : LayerA) + getContext() : ServiceContext + addAccountInfo() } class LayerC { - context : ServiceContext + LayerC(layerB : LayerB) + getContext() : ServiceContext + addAccountInfo() } } LayerC ..|> LayerB ServiceContext --> LayerC ServiceContext --> LayerB ServiceContext --> LayerA ServiceContextFactory ..|> "<<creates>>" ServiceContext LayerB ..|> LayerA @enduml