protected static boolean typeMatches(RemoteMethod method, RemoteParameter param,
			TraceObjectSchema rootSchema, KeyPath path, Class<?> type) {
		SchemaContext ctx = rootSchema.getContext();
		TraceObjectSchema sch = ctx.getSchemaOrNull(param.type());
		if (sch == null) {
			throw new RuntimeException(
				"The parameter '%s' of method '%s' refers to a non-existent schema '%s'"
						.formatted(param.name(), method.name(), param.type()));
		}
		if (type == TraceObject.class) {
			// The method cannot impose any further restriction. It must accept any object.
			return sch == PrimitiveTraceObjectSchema.OBJECT;
		}
		else if (TraceObjectInterface.class.isAssignableFrom(type)) {
			if (path == null) {
				return sch.getInterfaces().contains(type);
			}
			KeyPath found =
				rootSchema.searchForSuitable(type.asSubclass(TraceObjectInterface.class), path);
			if (found == null) {
				return false;
			}
			return sch == rootSchema.getSuccessorSchema(path);
		}
		else {
			return sch.getType() == type;
		}
	}
TODO: RemoteMethod parameter descriptions should also use ValStr. This map conversion
stuff is getting onerous and hacky.
Ghidra/Debug/Debugger-rmi-trace/src/main/java/ghidra/app/plugin/core/debug/service/tracermi/TraceRmiTarget.java