https://github.com/iluwatar/java-design-patterns-web/issues/8 Update pattern categories and tags
This commit is contained in:
@ -5,10 +5,7 @@ folder: trampoline
|
||||
permalink: /patterns/trampoline/
|
||||
categories: Behavioral
|
||||
tags:
|
||||
- Java
|
||||
- Difficulty-Intermediate
|
||||
- Performance
|
||||
- Recursion
|
||||
---
|
||||
|
||||
## Intent
|
||||
@ -31,14 +28,17 @@ Use the Trampoline pattern when
|
||||
* For interleaving the execution of two or more functions on the same thread.
|
||||
|
||||
## Known uses(real world examples)
|
||||
|
||||
* 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.
|
||||
|
||||
|
||||
## Tutorials
|
||||
|
||||
* [Trampolining: a practical guide for awesome Java Developers](https://medium.com/@johnmcclean/trampolining-a-practical-guide-for-awesome-java-developers-4b657d9c3076)
|
||||
* [Trampoline in java ](http://mindprod.com/jgloss/trampoline.html)
|
||||
|
||||
## Credits
|
||||
|
||||
* [library 'cyclops-react' uses the pattern](https://github.com/aol/cyclops-react)
|
||||
|
Reference in New Issue
Block a user