public boolean hasQualifier(@Nullable PsiClass targetClass) {
    return targetClass != null && getQualifierIfPresent(JavaPsiFacade.getElementFactory(myProject).createType(targetClass)) != null;
  }
public boolean hasQualifier(@Nullable PsiClass targetClass)