/*
 * @author max
 */
package com.intellij.psi.stubs;

import com.intellij.lang.Language;
import com.intellij.psi.PsiElement;
import com.intellij.psi.tree.IElementType;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public abstract class IStubElementType<StubT extends StubElement, PsiT extends PsiElement> extends IElementType {
  public IStubElementType(@NotNull @NonNls final String debugName, @Nullable final Language language) {
    super(debugName, language);
  }

  public abstract PsiT createPsi(StubT stub);

  public abstract StubT createStub(PsiT psi, final StubElement parentStub);  
}
@@ -400,16 +400,49 @@
 mentType
+ implements StubSerializer%3CStubT%3E
  %7B%0A  pub

merge StubSerializer into IStubElementType