PsiTypeParameterListOwner () { final PsiElement parent = getParent(); if (parent == null) throw new PsiInvalidElementAccessException(this); final PsiElement parentParent = parent.getParent(); if (!(parentParent instanceof PsiTypeParameterListOwner)) { return null; } return (PsiTypeParameterListOwner)parentParent; }