1
0
mirror of https://github.com/DanilaFe/abacus synced 2024-11-16 23:53:09 -08:00

Ensure PromotionManager clears its implementation cache.

This commit is contained in:
Danila Fedorin 2017-09-01 18:33:12 -07:00
parent e62722ce2f
commit 1f6aa70230
2 changed files with 10 additions and 1 deletions

View File

@ -64,6 +64,7 @@ public class Abacus {
pluginManager.addListener(shuntingYardParser);
pluginManager.addListener(lexerTokenizer);
pluginManager.addListener(promotionManager);
}
/**

View File

@ -6,7 +6,6 @@ import org.nwapw.abacus.plugin.PluginListener
import org.nwapw.abacus.plugin.PluginManager
import java.util.function.Function
class PromotionManager(val abacus: Abacus) {
/**
* A class that handles promotions based on priority and the
* transition paths each implementation provides.
@ -72,4 +71,13 @@ class PromotionManager(val abacus: Abacus) : PluginListener {
}.toTypedArray(), promotedTo = highestPriority)
}
override fun onLoad(manager: PluginManager?) {
}
override fun onUnload(manager: PluginManager?) {
computePaths.clear()
}
}