@Override
  public String getQualifiedName() {
    PsiClassStub<?> stub = getGreenStub();
    if (stub != null) {
      return stub.getQualifiedName();
    }

    PsiElement parent = getParent();
    if (parent instanceof PsiJavaFile) {
      return StringUtil.getQualifiedName(((PsiJavaFile)parent).getPackageName(), StringUtil.notNullize(getName()));
    }
    if (parent instanceof PsiClass) {
      //it cannot be referenced outside ImplicitClass
      if (parent instanceof PsiImplicitClass) return StringUtil.notNullize(getName());
      String parentQName = ((PsiClass)parent).getQualifiedName();
      if (parentQName == null) return null;
      return StringUtil.getQualifiedName(parentQName, StringUtil.notNullize(getName()));
    }

    return null;
  }
@Override
  public String getQualifiedName()