diff options
author | Decebal Suiu <decebal.suiu@gmail.com> | 2018-01-18 20:12:35 +0200 |
---|---|---|
committer | Decebal Suiu <decebal.suiu@gmail.com> | 2018-01-18 20:12:35 +0200 |
commit | a78fe6d7e6d9b11c2f2d8360ddf2d9cc13be7e8b (patch) | |
tree | 96059e4c9e72ccf8f01bbd944a0684f49db1382d /pf4j | |
parent | f4641c5119cc5157d1bda09abde40a9259b9c200 (diff) | |
download | pf4j-a78fe6d7e6d9b11c2f2d8360ddf2d9cc13be7e8b.tar.gz pf4j-a78fe6d7e6d9b11c2f2d8360ddf2d9cc13be7e8b.zip |
Formatting
Diffstat (limited to 'pf4j')
-rw-r--r-- | pf4j/src/main/java/org/pf4j/AbstractPluginManager.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java b/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java index 711d764..9f3471e 100644 --- a/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java +++ b/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java @@ -525,27 +525,29 @@ public abstract class AbstractPluginManager implements PluginManager { return pluginClassLoaders.get(pluginId); } + @SuppressWarnings("unchecked") @Override public <T> List<Class<T>> getExtensionClasses(Class<T> type) { List<ExtensionWrapper<T>> extensionsWrapper = extensionFinder.find(type); List<Class<T>> extensionClasses = new ArrayList<>(extensionsWrapper.size()); for (ExtensionWrapper<T> extensionWrapper : extensionsWrapper) { - @SuppressWarnings("unchecked") - Class<T> c = (Class<T>)extensionWrapper.getDescriptor().extensionClass; + Class<T> c = (Class<T>) extensionWrapper.getDescriptor().extensionClass; extensionClasses.add(c); } + return extensionClasses; } + @SuppressWarnings("unchecked") @Override public <T> List<Class<T>> getExtensionClasses(Class<T> type, String pluginId) { List<ExtensionWrapper<T>> extensionsWrapper = extensionFinder.find(type, pluginId); List<Class<T>> extensionClasses = new ArrayList<>(extensionsWrapper.size()); for (ExtensionWrapper<T> extensionWrapper : extensionsWrapper) { - @SuppressWarnings("unchecked") - Class<T> c = (Class<T>)extensionWrapper.getDescriptor().extensionClass; + Class<T> c = (Class<T>) extensionWrapper.getDescriptor().extensionClass; extensionClasses.add(c); } + return extensionClasses; } |