PluginDescriptorCollectorAction(List<PluginDescriptor> descriptors) {
this.descriptors = descriptors;
}
public void execute(FileCopyDetails fileCopyDetails) {
PluginDescriptor descriptor;
try {
descriptor = new PluginDescriptor(fileCopyDetails.getFile().toURI().toURL());
} catch (MalformedURLException e) {
// Not sure under what scenario (if any) this would occur,
// but there's no sense in collecting the descriptor if it does.
return;
}
if (descriptor.getImplementationClassName() != null) {
descriptors.add(descriptor);
}
}