Add binary strings

This commit is contained in:
Andrea Cavalli 2024-09-26 19:28:10 +02:00
parent 5d3a415afb
commit 5b39288d60
3 changed files with 7 additions and 3 deletions

View File

@ -390,7 +390,7 @@ public class DataModel {
arrayRawTypes.stream() arrayRawTypes.stream()
.filter(NATIVE_TYPES::contains) .filter(NATIVE_TYPES::contains)
.map(baseType -> .map(baseType ->
new ComputedTypeArrayNative(baseType, computedTypeSupplier)) new ComputedTypeArrayNative(baseType, computedTypeSupplier, binaryStrings))
.forEach(versionBaseTypes::add); .forEach(versionBaseTypes::add);
} }
// Compute native types // Compute native types

View File

@ -32,6 +32,9 @@ public class MavenPlugin extends AbstractMojo {
@Parameter(defaultValue = "false") @Parameter(defaultValue = "false")
private String generateTestResources; private String generateTestResources;
@Parameter(defaultValue = "false")
private String binaryStrings;
/** /**
* @parameter default-value="${project}" * @parameter default-value="${project}"
* @required * @required
@ -50,7 +53,7 @@ public class MavenPlugin extends AbstractMojo {
Path outPath = genRecordsPath.resolve("java"); Path outPath = genRecordsPath.resolve("java");
this.project.addCompileSourceRoot(outPath.toString()); this.project.addCompileSourceRoot(outPath.toString());
sourcesGenerator.generateSources(basePackageName, outPath, Boolean.parseBoolean(useRecordBuilder), false, Boolean.parseBoolean(deepCheckBeforeCreatingNewEqualInstances), sourcesGenerator.generateSources(basePackageName, outPath, Boolean.parseBoolean(useRecordBuilder), false, Boolean.parseBoolean(deepCheckBeforeCreatingNewEqualInstances),
Boolean.parseBoolean(generateOldSerializers)); Boolean.parseBoolean(generateOldSerializers), Boolean.parseBoolean(binaryStrings));
} catch (IOException e) { } catch (IOException e) {
throw new MojoExecutionException("Exception while generating classes", e); throw new MojoExecutionException("Exception while generating classes", e);
} }

View File

@ -19,7 +19,8 @@ public class Standalone {
parseBoolean(args[3]), parseBoolean(args[3]),
parseBoolean(args[4]), parseBoolean(args[4]),
parseBoolean(args[5]), parseBoolean(args[5]),
parseBoolean(args[6]) parseBoolean(args[6]),
parseBoolean(args[7])
); );
} }
} }