@Nullable
  @Override
  public JvmTypeResolveResult resolveType() {
    ClassResolveResult resolveResult = resolveGenerics();
    PsiClass clazz = resolveResult.getElement();
    return clazz == null ? null : new JvmTypeResolveResult() {

      private final JvmSubstitutor mySubstitutor = new PsiJvmSubstitutor(clazz.getProject(), resolveResult.getSubstitutor());

      @NotNull
      @Override
      public JvmTypeDeclaration getDeclaration() {
        return clazz;
      }

      @NotNull
      @Override
      public JvmSubstitutor getSubstitutor() {
        return mySubstitutor;
      }
    };
  }
@Nullable
  @Override
  public JvmTypeResolveResult resolveType()