has_method support for primitive fields in java runtime. Changed: idl.h, FlatBufferBuilder.java , idl_gen_general.cpp, idl_parser.cpp, flatc.cpp (#5468)

* has_method support for primitive fields in java runtime

* adding the new flag to flatc

* addressing the review comments
This commit is contained in:
Edward
2019-08-19 12:46:48 -07:00
committed by Wouter van Oortmerssen
parent acc9990abd
commit a20e71ac96
5 changed files with 38 additions and 0 deletions

View File

@@ -319,6 +319,8 @@ int FlatCompiler::Compile(int argc, const char **argv) {
opts.force_defaults = true;
} else if (arg == "--force-empty") {
opts.set_empty_to_null = false;
} else if (arg == "--java-primitive-has-method") {
opts.java_primitive_has_method = true;
} else {
for (size_t i = 0; i < params_.num_generators; ++i) {
if (arg == params_.generators[i].generator_opt_long ||