public void addDeclaration(@NotNull PsiElement element) {
    if (element instanceof PsiMethod) {
      myMethods.add((PsiMethod)element);
    }
    else if (element instanceof PsiVariable) {
      myVariables.add((PsiVariable)element);
    }
    else {
      LOG.error("Unknown declaration: " + element);
    }
  }
public void addDeclaration(@NotNull PsiElement element)