@Override
    public void visitMethod(@NotNull RefMethod method) {
      if (!myProcessedMethods.contains(method)) {
        // Process class's static initializers
        RefClass methodOwnerClass = method.getOwnerClass();
        if (method.isStatic() || method.isConstructor() || method.isEntry()) {
          if (method.isStatic()) {
            RefElementImpl owner = (RefElementImpl)method.getOwner();
            if (owner != null) {
              owner.setReachable(true);
            }
          }
          else if (methodOwnerClass != null) {
            addInstantiatedClass(methodOwnerClass);
          }
          myProcessedMethods.add(method);
          makeContentReachable((RefJavaElementImpl)method);
          makeReachable(methodOwnerClass);
        }
        else {
          if (methodOwnerClass == null || isClassInstantiated(methodOwnerClass)) {
            myProcessedMethods.add(method);
            makeContentReachable((RefJavaElementImpl)method);
          }
          else {
            addDelayedMethod(method, methodOwnerClass);
          }
        }
        for (RefOverridable reference : method.getDerivedReferences()) {
          if (reference instanceof RefMethod) {
            visitMethod(((RefMethod)reference));
          }
          else if (reference instanceof RefFunctionalExpression) {
            visitFunctionalExpression(((RefFunctionalExpression)reference));
          }
        }
      }
    }
@Override
    public void visitMethod(@NotNull RefMethod method)