| 
									
										
										
										
											2016-08-30 13:29:12 +02:00
										 |  |  | @startuml | 
					
						
							|  |  |  | package com.iluwatar.factorykit { | 
					
						
							|  |  |  |   class App { | 
					
						
							| 
									
										
										
										
											2016-11-26 12:51:06 +01:00
										 |  |  |     - LOGGER : Logger {static} | 
					
						
							| 
									
										
										
										
											2016-08-30 13:29:12 +02:00
										 |  |  |     + App() | 
					
						
							|  |  |  |     + main(args : String[]) {static} | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2016-09-18 17:51:09 +03:00
										 |  |  |   class Axe { | 
					
						
							|  |  |  |     + Axe() | 
					
						
							|  |  |  |     + toString() : String | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  |   class Bow { | 
					
						
							|  |  |  |     + Bow() | 
					
						
							|  |  |  |     + toString() : String | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  |   interface Builder { | 
					
						
							|  |  |  |     + add(WeaponType, Supplier<Weapon>) {abstract} | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2016-11-26 12:51:06 +01:00
										 |  |  |   class Spear { | 
					
						
							|  |  |  |     + Spear() | 
					
						
							|  |  |  |     + toString() : String | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  |   class Sword { | 
					
						
							|  |  |  |     + Sword() | 
					
						
							|  |  |  |     + toString() : String | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  |   interface Weapon { | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  |   interface WeaponFactory { | 
					
						
							|  |  |  |     + create(WeaponType) : Weapon {abstract} | 
					
						
							|  |  |  |     + factory(consumer : Consumer<Builder>) : WeaponFactory {static} | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2016-08-30 13:29:12 +02:00
										 |  |  |   enum WeaponType { | 
					
						
							|  |  |  |     + AXE {static} | 
					
						
							|  |  |  |     + BOW {static} | 
					
						
							|  |  |  |     + SPEAR {static} | 
					
						
							|  |  |  |     + SWORD {static} | 
					
						
							|  |  |  |     + valueOf(name : String) : WeaponType {static} | 
					
						
							|  |  |  |     + values() : WeaponType[] {static} | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | Axe ..|> Weapon  | 
					
						
							| 
									
										
										
										
											2016-09-18 17:51:09 +03:00
										 |  |  | Bow ..|> Weapon  | 
					
						
							| 
									
										
										
										
											2016-11-26 12:51:06 +01:00
										 |  |  | Spear ..|> Weapon  | 
					
						
							|  |  |  | Sword ..|> Weapon  | 
					
						
							| 
									
										
										
										
											2016-08-30 13:29:12 +02:00
										 |  |  | @enduml |