@NotNull
  @Override
  public ReferenceType evaluate(EvaluationContextImpl context) throws EvaluateException {
    ClassLoaderReference classLoader = context.getClassLoader();
    ReferenceType lastRes = SoftReference.dereference(myLastResult);
    if (lastRes != null && classLoader == SoftReference.dereference(myLastClassLoader)) {
      // if class loader is null, check that vms match
      if (classLoader != null || lastRes.virtualMachine().equals(context.getSuspendContext().getVirtualMachine().getVirtualMachine())) {
        return lastRes;
      }
    }
    DebugProcessImpl debugProcess = context.getDebugProcess();
    String typeName = myTypeName.getName(debugProcess);
    ReferenceType type;
    try {
      type = debugProcess.findClass(context, typeName, classLoader);
    }
    catch (EvaluateException e) {
      ReferenceType singleLoadedClass =
        getOnlyItem(filter(context.getSuspendContext().getVirtualMachine().classesByName(typeName), ReferenceType::isPrepared));
      if (singleLoadedClass == null) {
        throw e;
      }
      if (LOG.isDebugEnabled()) {
        LOG.debug("Unable to find or load class " + typeName + " in the requested classloader " + classLoader +
                  ", will use the single loaded class " + singleLoadedClass + " from " + singleLoadedClass.classLoader());
      }
      type = singleLoadedClass;
    }
    if (type == null) {
      throw EvaluateExceptionUtil.createEvaluateException(JavaDebuggerBundle.message("error.class.not.loaded", typeName));
    }
    myLastClassLoader = new WeakReference<>(classLoader);
    myLastResult = new WeakReference<>(type);
    return type;
  }
@NotNull
  @Override
  public ReferenceType evaluate(EvaluationContextImpl context)