LightTypeParameterBuilder (@NlsSafe @NotNull String name) { LightTypeParameterBuilder typeParameter = new LightTypeParameterBuilder(name, this, getTypeParameters().length) { @Override public PsiFile getContainingFile() { return GrLightMethodBuilder.this.getContainingFile(); } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; LightTypeParameterBuilder builder = (LightTypeParameterBuilder)o; return getName().equals(builder.getName()); } @Override public int hashCode() { return getName().hashCode(); } }; myTypeParameterList.addParameter(typeParameter); return typeParameter; }