Don't generate utility methods in older versions

This commit is contained in:
Andrea Cavalli 2023-01-22 11:56:47 +01:00
parent 041a223a5d
commit 17116a2bd3

View File

@ -113,7 +113,9 @@ public class GenDataBaseX extends ClassGenerator {
ofMethod.addCode(String.join(", ", base.getData().keySet()));
ofMethod.addStatement(")");
ofMethod.returns(type);
classBuilder.addMethod(ofMethod.build());
if (version.isCurrent()) {
classBuilder.addMethod(ofMethod.build());
}
return new GeneratedClass(type.packageName(), classBuilder);
}