boolean (Method m, List<Value> args) { try { List<Type> argumentTypes = m.argumentTypes(); for (int i = 0; i < argumentTypes.size(); i++) { Type expectedArgType = argumentTypes.get(i); Type argType = args.get(i).type(); if (expectedArgType.equals(argType)) { continue; } if (expectedArgType instanceof ReferenceType) { if (argType == null) { continue; } else if (argType instanceof PrimitiveType) { // TODO: boxing-unboxing } else if (argType instanceof ReferenceType && DebuggerUtilsImpl.instanceOf((ReferenceType)argType, (ReferenceType)expectedArgType)) { continue; } } return false; } } catch (ClassNotLoadedException ignored) { return false; } return true; }