forked from BigfootDev/flatbuffers
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:
committed by
Wouter van Oortmerssen
parent
acc9990abd
commit
a20e71ac96
@@ -199,6 +199,17 @@ public class FlatBufferBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to test if a field is present in the table
|
||||
*
|
||||
* @param table Flatbuffer table
|
||||
* @param offset virtual table offset
|
||||
* @return true if the filed is present
|
||||
*/
|
||||
public static boolean isFieldPresent(Table table, int offset) {
|
||||
return table.__offset(offset) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the FlatBufferBuilder by purging all data that it holds.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user