@Override
  public PsiTypeParameter @NotNull [] getTypeParameters() {
    if (cached == null) {
      if (myParameters.isEmpty()) {
        cached = PsiTypeParameter.EMPTY_ARRAY;
      }
      else {
        cached = myParameters.toArray(PsiTypeParameter.EMPTY_ARRAY);
      }
    }
    return cached;
  }
@Override
  public PsiTypeParameter @NotNull [] getTypeParameters()