}
}
private static Path findScriptByAnnotation(Closure<?> closure) {
Class<?> rootClass = getRootClass(closure);
ScriptPath annotation = rootClass.getAnnotation(ScriptPath.class);
if (annotation == null) {
return null;
} else {
String scriptPath = annotation.value();
URI uri;
try {
uri = new URI(scriptPath);
} catch (URISyntaxException e) {
return null;