@Override
 @NotNull
 public Collection<RefMethod> getSuperMethods() {
   if (mySuperMethods == null) return EMPTY_METHOD_LIST;
   if (mySuperMethods.size() > 10) {
     LOG.info("method: " + getName() + " owner:" + getOwnerClass().getQualifiedName());
   }
   if (getRefManager().isOfflineView()) {
     LOG.debug("Should not traverse graph offline");
   }
   return mySuperMethods;
 }
  @Override
  protected void initialize() {
    final PsiMethod method = (PsiMethod) getElement();
    LOG.assertTrue(method != null);
    setConstructor(method.isConstructor());
    final PsiType returnType = method.getReturnType();
    setFlag(
        returnType == null
            || PsiType.VOID.equals(returnType)
            || returnType.equalsToText(CommonClassNames.JAVA_LANG_VOID),
        IS_RETURN_VALUE_USED_MASK);

    if (!isReturnValueUsed()) {
      myReturnValueTemplate = RETURN_VALUE_UNDEFINED;
    }

    if (isConstructor()) {
      addReference(getOwnerClass(), getOwnerClass().getElement(), method, false, true, null);
    }

    if (getOwnerClass().isInterface()) {
      setAbstract(false);
    } else {
      setAbstract(method.hasModifierProperty(PsiModifier.ABSTRACT));
    }

    setAppMain(isAppMain(method, this));
    setLibraryOverride(method.hasModifierProperty(PsiModifier.NATIVE));

    initializeSuperMethods(method);
    if (isExternalOverride()) {
      ((RefClassImpl) getOwnerClass()).addLibraryOverrideMethod(this);
    }

    @NonNls final String name = method.getName();
    if (getOwnerClass().isTestCase() && name.startsWith("test")) {
      setTestMethod(true);
    }

    PsiParameter[] paramList = method.getParameterList().getParameters();
    if (paramList.length > 0) {
      myParameters = new RefParameterImpl[paramList.length];
      for (int i = 0; i < paramList.length; i++) {
        PsiParameter parameter = paramList[i];
        myParameters[i] = getRefJavaManager().getParameterReference(parameter, i);
      }
    }

    if (method.hasModifierProperty(PsiModifier.NATIVE)) {
      updateReturnValueTemplate(null);
      updateThrowsList(null);
    }
    collectUncaughtExceptions(method);
  }
 @Override
 @Nullable
 public PsiClass[] getUnThrownExceptions() {
   if (getRefManager().isOfflineView()) {
     LOG.debug("Should not traverse graph offline");
   }
   if (myUnThrownExceptions == null) return null;
   JavaPsiFacade facade = JavaPsiFacade.getInstance(myManager.getProject());
   List<PsiClass> result = new ArrayList<PsiClass>(myUnThrownExceptions.size());
   for (String exception : myUnThrownExceptions) {
     PsiClass element =
         facade.findClass(exception, GlobalSearchScope.allScope(myManager.getProject()));
     if (element != null) result.add(element);
   }
   return result.toArray(new PsiClass[result.size()]);
 }