mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-08-17 08:24:38 +00:00
Pr/1235 Review (#1250)
* Add simple implementation for strangler pattern. * Add strangler pattern in pom.xml. * change package name * Revert "change package name" This reverts commit 430bd9073ea7bea6430586a0953c77f1798aacc8. * Code review for strangler Delete final of method parameters. Add final to private members. Change package name. * Revert "Code review for strangler" This reverts commit d5063567083e0348d678a938bd749e17343bcb8e. * Revert "Revert "Code review for strangler"" This reverts commit c8fd65fda782749c4f74f6de85da0f271d3c48a8. * Remove unnecessary files
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
@@ -0,0 +1,61 @@
|
||||
@startuml
|
||||
|
||||
package com.iluwatar.strangler {
|
||||
class App {
|
||||
+ main(args : String[]) {static}
|
||||
}
|
||||
|
||||
class OldArithmetic {
|
||||
- LOGGER : Logger {static}
|
||||
- VERSION : String {static}
|
||||
- source : OldSource
|
||||
+ sum(nums : int...)
|
||||
+ mul(nums : int...)
|
||||
}
|
||||
|
||||
class HalfArithmetic {
|
||||
- LOGGER : Logger {static}
|
||||
- VERSION : String {static}
|
||||
- oldSource : OldSource
|
||||
- newSource : HalfSource
|
||||
+ sum(nums : int...)
|
||||
+ mul(nums : int...)
|
||||
+ ifHasZero(nums : int...)
|
||||
}
|
||||
|
||||
class NewArithmetic {
|
||||
- LOGGER : Logger {static}
|
||||
- VERSION : String {static}
|
||||
- source : NewSource
|
||||
+ sum(nums : int...)
|
||||
+ mul(nums : int...)
|
||||
+ ifHasZero(nums : int...)
|
||||
}
|
||||
|
||||
class OldSource {
|
||||
- LOGGER : Logger {static}
|
||||
- VERSION : String {static}
|
||||
+ accumulateSum(nums : int...)
|
||||
+ accumulateMul(nums : int...)
|
||||
}
|
||||
|
||||
class HalfSource {
|
||||
- LOGGER : Logger {static}
|
||||
- VERSION : String {static}
|
||||
+ accumulateSum(nums : int...)
|
||||
+ ifNonZero(nums : int...)
|
||||
}
|
||||
|
||||
class NewSource {
|
||||
- LOGGER : Logger {static}
|
||||
- VERSION : String {static}
|
||||
+ accumulateSum(nums : int...)
|
||||
+ accumulateMul(nums : int...)
|
||||
+ ifNonZero(nums : int...)
|
||||
}
|
||||
}
|
||||
OldArithmetic o--> OldSource
|
||||
HalfArithmetic o--> OldSource
|
||||
HalfArithmetic o--> HalfSource
|
||||
NewArithmetic o--> NewSource
|
||||
@enduml
|
||||
Reference in New Issue
Block a user