return rootClass;
}
public static SourceInfo getSourceInfo(Closure<?> closure) {
Class<?> closureClass = closure.getClass();
LineNumber lineNumber = closureClass.getAnnotation(LineNumber.class);
if (lineNumber == null) {
return null;
}
Class<?> rootClass = getRootClass(closure);
ScriptPath scriptPath = rootClass.getAnnotation(ScriptPath.class);
if (scriptPath == null) {
return null;
}
return new SourceInfo(scriptPath.value(), lineNumber.value());
}