private static Value convertToPrimitive(EvaluationContext context, ObjectReference value, final String conversionMethodName,
                                          String conversionMethodSignature) throws EvaluateException {
    // for speedup first try value field
    Value primitiveValue = getInnerPrimitiveValue(value, true).join();
    if (primitiveValue != null) {
      return primitiveValue;
    }

    Method method = DebuggerUtils.findMethod(value.referenceType(), conversionMethodName, conversionMethodSignature);
    if (method == null) {
      throw new EvaluateException("Cannot convert to primitive value of type " + value.type() + ": Unable to find method " +
                                  conversionMethodName + conversionMethodSignature);
    }

    return context.getDebugProcess().invokeMethod(context, value, method, Collections.emptyList());
  }
private static Value convertToPrimitive(EvaluationContext context, ObjectReference value, final String conversionMethodName,
                                          String conversionMethodSignature)