java-design-patterns/decorator/etc/decorator.urm.puml

29 lines
580 B
Plaintext
Raw Normal View History

@startuml
package com.iluwatar.decorator {
interface Hostile {
+ attack() {abstract}
+ fleeBattle() {abstract}
+ getAttackPower() : int {abstract}
}
class App {
+ App()
+ main(args : String[]) {static}
}
class Troll {
+ Troll()
+ attack()
+ fleeBattle()
+ getAttackPower() : int
}
class SmartHostile {
- decorated : Hostile
+ SmartHostile(decorated : Hostile)
+ attack()
+ fleeBattle()
+ getAttackPower() : int
}
}
SmartHostile --> "-decorated" Hostile
Troll ..|> Hostile
SmartHostile ..|> Hostile
@enduml