}
private static DocumentDefinitions applyDefinitionsClosure(@DelegatesTo(value=DocumentDefinitions.class, strategy=Closure.DELEGATE_FIRST) Closure<?> closure) {
Closure<?> docDefClosure = (Closure<?>)closure.clone();
docDefClosure.setResolveStrategy(Closure.DELEGATE_FIRST);
DocumentDefinitions definitions = new DocumentDefinitions();
docDefClosure.setDelegate(definitions);
docDefClosure.call();
return definitions;
}