PsiClassType (GroovyScriptClass scriptClass, PsiAnnotation baseScriptAnnotation) { PsiClass clazz = GrAnnotationUtil.getPsiClass(findDeclaredDetachedValue(baseScriptAnnotation, "value")); if (clazz != null) { String className = clazz.getQualifiedName(); if (className == null) clazz.getName(); if (className != null) { return TypesUtil.createTypeByFQClassName(className, scriptClass); } } return null; }