remove unused extensions map in ExtensionRegistry
The access methods for this property had been commented out, and are unused,
but the contents of the map were still being maintained (unnecessarily).
@@ -14,11 +14,6 @@ import java.util.*;
*/
public class ExtensionRegistry {
- /**
- * Extensions
- */
- private HashMap<Class<? extends Extension>, Extension> extensions = new HashMap<>();
-
/**
* Unary operators used during the lexing phase.
*/
@@ -62,8 +57,6 @@ public class ExtensionRegistry {
public ExtensionRegistry(Collection<? extends Extension> extensions) {
for (Extension extension : extensions) {
- this.extensions.put(extension.getClass(), extension);
-
// token parsers
List<TokenParser> tokenParsers = extension.getTokenParsers();
if (tokenParsers != null) {
@@ -155,17 +148,4 @@ public class ExtensionRegistry {
public Map<String, TokenParser> getTokenParsers() {
return this.tokenParsers;
}
-
- /*
- @SuppressWarnings("unchecked")
- public <T extends Extension> T getExtension(Class<T> clazz) {
- return (T) this.extensions.get(clazz);
- }
-
-
-
- public HashMap<Class<? extends Extension>, Extension> getExtensions() {
- return extensions;
- }
- */
}
