mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-04 04:33:23 +00:00
Seal all classes in Java/C#
Makes enums/structs/tables unsubclassable (final or sealed) and prevents instantiation of enum classes (which are solely static constants). Tested (Mac OS 10.10.2): 1. run flattests 2. cd tests && ../flatc -c monster_test.fbs && ../flatc -j monster_test.fbs && ../flatc -g monster_test.fbs && ../flatc -n monster_test.fbs # Note deltas for C# and Java. 3. ./JavaTest.sh **Breaking api change** Change-Id: Ie008c941c36d212690da58ddc72c9b228eb7a093
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
9d368deb05
commit
557c57eb9d
@@ -7,7 +7,7 @@ import java.lang.*;
|
||||
import java.util.*;
|
||||
import com.google.flatbuffers.*;
|
||||
|
||||
public class Stat extends Table {
|
||||
public final class Stat extends Table {
|
||||
public static Stat getRootAsStat(ByteBuffer _bb) { return getRootAsStat(_bb, new Stat()); }
|
||||
public static Stat getRootAsStat(ByteBuffer _bb, Stat obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__init(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
|
||||
public Stat __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; return this; }
|
||||
|
||||
Reference in New Issue
Block a user