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