docs: diagrams for transaction script, twin, and type object

This commit is contained in:
Ilkka Seppälä
2025-04-12 09:35:40 +03:00
parent 21914f9c88
commit 6195d5e1e8
6 changed files with 13 additions and 1 deletions
+5 -1
View File
@@ -32,12 +32,16 @@ Real-world example
In plain words
> Explore how the Java Type Object pattern enables dynamic creation and management of flexible and extensible sets of related classes, ideal for Java developers seeking modularity without modifying existing codebase.
> Type Object pattern enables dynamic creation and management of flexible and extensible sets of related classes, ideal for Java developers seeking modularity without modifying existing codebase.
gameprogrammingpatterns.com says
> Define a type object class and a typed object class. Each type object instance represents a different logical type. Each typed object stores a reference to the type object that describes its type.
Flowchart
![Type Object Pattern Flowchart](./etc/type-object-flowchart.png)
## Programmatic Example of Type Object Pattern in Java
The Type Object pattern is a design pattern that allows for the creation of flexible and reusable objects by creating a class with a field that represents the 'type' of the object. This design pattern proves invaluable for scenarios where anticipated Java types are undefined upfront, or when modifications or additions are required, ensuring efficient Java development without frequent recompilations.
Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB