PsiClassType (@NotNull GroovyScriptClass scriptClass) { GrImportStatement[] importStatements = scriptClass.getContainingFile().getImportStatements(); for (GrImportStatement importStatement : importStatements) { GrModifierList annotations = importStatement.getAnnotationList(); PsiAnnotation baseScriptAnnotation = annotations.findAnnotation(GROOVY_TRANSFORM_BASE_SCRIPT); if (baseScriptAnnotation == null) { continue; } PsiClassType superClassType = getSuperClassTypeFromAnnotationValue(scriptClass, baseScriptAnnotation); if (superClassType != null) { return superClassType; } } return null; }