String (@NotNull BinaryFileStubBuilder.CompositeBinaryFileStubBuilder<?> builder) { BinaryFileStubBuilder.CompositeBinaryFileStubBuilder<Object> genericBuilder = (BinaryFileStubBuilder.CompositeBinaryFileStubBuilder<Object>)builder; return builder.getClass().getName() + ":" + builder.getStubVersion() + ";" + genericBuilder.getAllSubBuilders() .map(b -> genericBuilder.getSubBuilderVersion(b)) .sorted().collect(Collectors.joining(";")); }