Browse Source

Formatting

pull/197/head
Decebal Suiu 7 years ago
parent
commit
a78fe6d7e6
  1. 2
      demo/plugins/plugin1/pom.xml
  2. 2
      demo/plugins/plugin2/pom.xml
  3. 12
      demo/plugins/pom.xml
  4. 10
      pf4j/src/main/java/org/pf4j/AbstractPluginManager.java

2
demo/plugins/plugin1/pom.xml

@ -18,7 +18,7 @@
<plugin.class>org.pf4j.demo.welcome.WelcomePlugin</plugin.class>
<plugin.version>0.0.1</plugin.version>
<plugin.provider>Decebal Suiu</plugin.provider>
<plugin.dependencies />
<plugin.dependencies/>
</properties>
<dependencies>

2
demo/plugins/plugin2/pom.xml

@ -18,7 +18,7 @@
<plugin.class>org.pf4j.demo.hello.HelloPlugin</plugin.class>
<plugin.version>0.0.1</plugin.version>
<plugin.provider>Decebal Suiu</plugin.provider>
<plugin.dependencies />
<plugin.dependencies/>
</properties>
</project>

12
demo/plugins/pom.xml

@ -17,11 +17,13 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.7</java.version>
<plugin.id />
<plugin.class />
<plugin.version />
<plugin.provider />
<plugin.dependencies />
<!-- Override below properties in each plugin's pom.xml -->
<plugin.id/>
<plugin.class/>
<plugin.version/>
<plugin.provider/>
<plugin.dependencies/>
</properties>
<build>

10
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;
}

Loading…
Cancel
Save