@Override
  public PsiClassType @NotNull [] getReferencedTypes() {
    PsiClassType[] cachedTypes = myCachedTypes;
    if (cachedTypes == null || !isValid()) {
      GrCodeReferenceElement[] elementsGroovy = getReferenceElementsGroovy();
      cachedTypes = elementsGroovy.length == 0 ? PsiClassType.EMPTY_ARRAY : new PsiClassType[elementsGroovy.length];
      for (int i = 0; i < elementsGroovy.length; i++) {
        GrCodeReferenceElement ref = elementsGroovy[i];
        cachedTypes[i] = new GrClassReferenceType(ref);
      }
      myCachedTypes = cachedTypes;
    }
    return cachedTypes;
  }
@Override
  public PsiClassType @NotNull [] getReferencedTypes()