int (PsiTypeParameter typeParameter) { final GrTypeParameter[] typeParameters = getTypeParameters(); for (int i = 0; i < typeParameters.length; i++) { if (typeParameters[i].equals(typeParameter)) return i; } return -1; }