-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
809 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
in order to create UML images invoke command: | ||
|
||
``` | ||
java -jar plantuml.jar interpreter.txt | ||
``` | ||
|
||
where interpreter.txt is name of the file where UML image which will be generated is described | ||
|
||
Note: files with extension ucls are deprecated | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
@startuml | ||
|
||
abstract class AbstractFactory{ | ||
+Handler() | ||
+createProductA(): AbstractProductA | ||
+createProductB(): AbstractProductB | ||
} | ||
|
||
class ConcreteFactory1{ | ||
+ConcreteFactory1() | ||
+createProductA(): AbstractProductA | ||
+createProductB(): AbstractProductB | ||
} | ||
|
||
class ConcreteFactory2{ | ||
+ConcreteFactory2() | ||
+createProductA(): AbstractProductA | ||
+createProductB(): AbstractProductB | ||
} | ||
|
||
abstract class AbstractProductA{ | ||
+AbstractProductA() | ||
} | ||
|
||
class ProductA1{ | ||
+ProductA1() | ||
} | ||
|
||
class ProductA2{ | ||
+ProductA2() | ||
} | ||
|
||
abstract class AbstractProductB{ | ||
+AbstractProductB() | ||
} | ||
|
||
class ProductB1{ | ||
+ProductB1() | ||
} | ||
|
||
class ProductB2{ | ||
+ProductB2() | ||
} | ||
|
||
|
||
AbstractFactory <|-- ConcreteFactory1 | ||
AbstractFactory <|-- ConcreteFactory2 | ||
|
||
|
||
ConcreteFactory1 ..> ProductA1 | ||
ConcreteFactory1 ..> ProductB1 | ||
ConcreteFactory2 ..> ProductA2 | ||
ConcreteFactory2 ..> ProductB2 | ||
|
||
AbstractProductA <|-- ProductA1 | ||
AbstractProductA <|-- ProductA2 | ||
|
||
AbstractProductB <|-- ProductB1 | ||
AbstractProductB <|-- ProductB2 | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
@startuml | ||
|
||
abstract class Abstraction{ | ||
+Abstraction(Implementor) | ||
+operation(): String | ||
} | ||
|
||
class RefinedAbstraction{ | ||
+RefinedAbstraction(Implementor) | ||
+operation(): String | ||
} | ||
|
||
|
||
interface Implementor{ | ||
+implementation(): void | ||
} | ||
|
||
class ConcreteImplementorA{ | ||
+ConcreteImplementorA() | ||
+implementation(): void | ||
} | ||
|
||
class ConcreteImplementorB{ | ||
+ConcreteImplementorB() | ||
+implementation(): void | ||
} | ||
|
||
Abstraction <|-- RefinedAbstraction | ||
Implementor <|.. ConcreteImplementorA | ||
Implementor <|.. ConcreteImplementorB | ||
Abstraction o-> Implementor : implementor | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
@startuml | ||
|
||
class Director{ | ||
+Director(Builder) | ||
+construct(): void | ||
} | ||
|
||
abstract class Builder{ | ||
+Builder() | ||
+createProduct(): Builder | ||
+buildPart1(String): Builder | ||
+buildPart2(String): Builder | ||
} | ||
|
||
class ConcreteBuilder{ | ||
+ConcreteBuilder() | ||
+createProduct(): Builder | ||
+buildPart1(String): Builder | ||
+buildPart2(String): Builder | ||
+getResult(): Product | ||
} | ||
|
||
class Product{ | ||
+part1: String | ||
+part2: String | ||
+Product() | ||
+setPart1(String): void | ||
+setPart2(String): void | ||
+getPart1(): String | ||
+getPart12(): String | ||
|
||
} | ||
|
||
Director o-> Builder : builder | ||
Builder <|-- ConcreteBuilder | ||
ConcreteBuilder .> Product : product | ||
|
||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@startuml | ||
|
||
abstract class Handler{ | ||
+Handler() | ||
+handleRequest(): void | ||
+setSuccesor(Handler): void | ||
} | ||
|
||
class ConcreteHandlerA{ | ||
+ConcreteHandlerA() | ||
+handleRequest(): void | ||
} | ||
|
||
class ConcreteHandlerB{ | ||
+ConcreteHandlerB() | ||
+handleRequest(): void | ||
} | ||
|
||
Handler <|-- ConcreteHandlerA | ||
Handler <|-- ConcreteHandlerB | ||
Handler --> Handler : succesor | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
@startuml | ||
|
||
interface Target{ | ||
+request(): String | ||
} | ||
|
||
class Adapter{ | ||
+Adapter() | ||
+request(): String | ||
} | ||
|
||
class Adaptee{ | ||
+Adapter() | ||
+specialRequest(): String | ||
} | ||
|
||
Adaptee <|-- Adapter | ||
Target <|.. Adapter | ||
|
||
|
||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@startuml | ||
|
||
abstract class Invoker{ | ||
+Invoker(Coommand) | ||
+execute(): void | ||
} | ||
|
||
interface Command{ | ||
+execute(): void | ||
} | ||
|
||
class Receiver{ | ||
+Receiver() | ||
+action(): void | ||
} | ||
|
||
class ConcreteCommand{ | ||
+ConcreteCommand(Receiver) | ||
+execute(): void | ||
} | ||
|
||
|
||
Invoker -> Command : command | ||
Command <|-- ConcreteCommand | ||
Receiver <- ConcreteCommand : receiver | ||
|
||
|
||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@startuml | ||
|
||
class Client{ | ||
} | ||
|
||
abstract class Component{ | ||
+Component() | ||
+operation(): void | ||
} | ||
|
||
class Leaf{ | ||
+Leaf() | ||
+operation(): void | ||
} | ||
|
||
class Composite{ | ||
+Composite() | ||
+operation(): void | ||
+add(Component): void | ||
+remove(Component): void | ||
+getChild(int): Component | ||
} | ||
|
||
Client -> Component | ||
Component <|-- Leaf | ||
Component <|-- Composite | ||
Composite o--> Component : children | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
@startuml | ||
|
||
interface Component{ | ||
+operation(): void | ||
} | ||
|
||
class ConcreteComponent{ | ||
+ConcreteComponent() | ||
+operation(): void | ||
} | ||
|
||
class Decorator{ | ||
+Decorator() | ||
+operation(): void | ||
+setComponenet(Component): void | ||
} | ||
|
||
class ConcreteDecoratorA{ | ||
+state: boolean | ||
+ConcreteDecoratorA() | ||
+operation(): void | ||
+isState(): boolean | ||
} | ||
|
||
class ConcreteDecoratorB{ | ||
+ConcreteDecoratorB() | ||
+operation(): void | ||
-addedBehavior(): void | ||
} | ||
|
||
Component <|.. ConcreteComponent | ||
Component <|.. Decorator | ||
Decorator o--> Component : component | ||
Decorator <|-- ConcreteDecoratorA | ||
Decorator <|-- ConcreteDecoratorB | ||
|
||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
@startuml | ||
|
||
package facade <<Rectangle>> { | ||
class Compiler | ||
} | ||
|
||
class Compiler{ | ||
+Compiler() | ||
+compile(String): int | ||
} | ||
|
||
package "compiler subsystem classes" <<Rectangle>> { | ||
class Tokenizer | ||
class Generator | ||
class Parser | ||
class Node | ||
class OperandNode | ||
class ExpressionNode | ||
} | ||
|
||
class Tokenizer{ | ||
+Tokenizer() | ||
+tokenize(String): List<String> | ||
} | ||
|
||
class Generator{ | ||
+Generator() | ||
+generate(Node): int | ||
} | ||
|
||
class Parser{ | ||
+expressionStack: Stack<String> | ||
+operandStack: Stack<String> | ||
+Parser() | ||
+parse(List<String>): Node | ||
} | ||
|
||
class Node{ | ||
+Node() | ||
} | ||
|
||
class OperandNode{ | ||
-value: int | ||
+OperandNode() | ||
+getValue(): int | ||
+setValue(int): void | ||
} | ||
|
||
class ExpressionNode{ | ||
-operator: char | ||
+ExpressionNode() | ||
+getOperator(): char | ||
+setOperator(char): void | ||
+getLeft(): Node | ||
+setLeft(Node): void | ||
+getRight(): Node | ||
+setRight(Node): void | ||
} | ||
|
||
|
||
|
||
Compiler ..> Tokenizer | ||
Compiler ..> Generator | ||
Compiler ..> Node | ||
Generator .> Node | ||
Compiler ..> Parser | ||
Node <. Parser | ||
Node <|-- OperandNode | ||
Node <|-- ExpressionNode | ||
|
||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
@startuml | ||
|
||
interface Product | ||
abstract class Creator | ||
|
||
Product <|.. ConcreteProductA | ||
|
||
Creator <|-- ConcreteCreator | ||
|
||
ConcreteCreator .> ConcreteProductA | ||
|
||
Creator : factoryMethod() | ||
|
||
|
||
ConcreteCreator : factoryMethod() | ||
|
||
|
||
@enduml |
Oops, something went wrong.