public static PsiMethod @NotNull [] getAllMethods(final GrTypeDefinition grType) {
    return CachedValuesManager.getCachedValue(grType, () -> {
      List<PsiMethod> list = new ArrayList<>();
      getAllMethodsInner(grType, list, new HashSet<>());
      return CachedValueProvider.Result
        .create(list.toArray(PsiMethod.EMPTY_ARRAY), PsiModificationTracker.MODIFICATION_COUNT, grType);
    });
  }
public static PsiMethod @NotNull [] getAllMethods(final GrTypeDefinition grType)