private Closure createCondition(Class<? extends Closure> clazz) {
try {
return clazz.getConstructor(Object.class, Object.class).newInstance(null, null);
} catch (Exception e) {
throw new ExtensionException("Failed to instantiate @Requires condition", e);
}
}