}
Object instance = service.get();
Command ann = method.getAnnotation(Command.class);
List<Predicate<UIContext>> enabledPredicates = new ArrayList<>();
for (Class<? extends Predicate<UIContext>> type : ann.enabled())
{
enabledPredicates.add(registry.getServices(type).get());
}
return new AnnotationCommandAdapter(method, instance, factory, enabledPredicates);
}