public MemoryAgentCapabilities initializeCapabilities(@NotNull EvaluationContextImpl context) throws EvaluateException {
    ClassType proxyType = getProxyType(context);
    boolean isAgentLoaded = checkAgentCapability(context, proxyType, IS_LOADED);
    if (!isAgentLoaded) {
      return MemoryAgentCapabilities.DISABLED;
    }
    else {
      MemoryAgentCapabilities.Builder builder = new MemoryAgentCapabilities.Builder();
      return builder
        .setCanEstimateObjectSize(checkAgentCapability(context, proxyType, CAN_ESTIMATE_OBJECT_SIZE))
        .setCanEstimateObjectsSizes(checkAgentCapability(context, proxyType, CAN_ESTIMATE_OBJECTS_SIZES))
        .setCanGetShallowSizeByClasses(checkAgentCapability(context, proxyType, CAN_GET_SHALLOW_SIZE_BY_CLASSES))
        .setCanGetRetainedSizeByClasses(checkAgentCapability(context, proxyType, CAN_GET_RETAINED_SIZE_BY_CLASSES))
        .setCanFindPathsToClosestGcRoots(checkAgentCapability(context, proxyType, CAN_FIND_PATHS_TO_CLOSEST_GC_ROOTS))
        .buildLoaded();
    }
  }
public MemoryAgentCapabilities initializeCapabilities(@NotNull EvaluationContextImpl context)