Unload all templates, dictionaries and import relationships, but leave renderers and adaptors. This essentially forces the next call to #getInstanceOf to reload templates. Call unload() on each group in the #imports list, and remove all elements in {@link #importsToClearOnUnl
()
| 272 | */ |
| 273 | |
| 274 | public synchronized void unload() { |
| 275 | templates.clear(); |
| 276 | dictionaries.clear(); |
| 277 | for (STGroup imp : imports) { |
| 278 | imp.unload(); |
| 279 | } |
| 280 | for (STGroup imp : importsToClearOnUnload) { |
| 281 | imports.remove(imp); |
| 282 | } |
| 283 | importsToClearOnUnload.clear(); |
| 284 | } |
| 285 | |
| 286 | /** Load st from disk if directory or load whole group file if .stg file (then |
| 287 | * return just one template). {@code name} is fully-qualified. |