List<Class<? extends Plugin>> matchingClasses = newArrayList(Collections2.filter(getPlugins(),
new Predicate<Class<? extends Plugin>>() {
@Override
public boolean apply(Class<? extends Plugin> input) {
Shell shell = input.getAnnotation(Shell.class);
if (shell != null && shell.value().equalsIgnoreCase(pluginName)) return true;
return input.getSimpleName().toLowerCase().contains(pluginName);
}
}));
if (matchingClasses.isEmpty()) {