docs: updated diagrams for tolerant reader and trampoline

This commit is contained in:
Ilkka Seppälä
2025-04-12 09:23:46 +03:00
parent 95bfd6cb4d
commit 21914f9c88
4 changed files with 8 additions and 0 deletions
+4
View File
@@ -36,6 +36,10 @@ Wikipedia says
> In Java, trampoline refers to using reflection to avoid using inner classes, for example in event listeners. The time overhead of a reflection call is traded for the space overhead of an inner class. Trampolines in Java usually involve the creation of a GenericListener to pass events to an outer class.
Flowchart
![Trampoline Pattern Flowchart](./etc/trampoline-flowchart.png)
## Programmatic Example of Trampoline Pattern in Java
Here's the `Trampoline` implementation in Java.
Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB