Add @javax.annotation.Generated to generated flatbuffer Java types (#4986)

* Add @javax.annotation.Generated to generated flatbuffer Java types.

* Updating test goldens.
This commit is contained in:
Rikard Lundmark
2018-10-08 23:29:22 +01:00
committed by Wouter van Oortmerssen
parent 99fe1dc80f
commit 233976c821
20 changed files with 26 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ import java.util.*;
import com.google.flatbuffers.*;
@SuppressWarnings("unused")
@javax.annotation.Generated(value="flatc")
public final class Ability extends Struct {
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public Ability __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

View File

@@ -2,6 +2,8 @@
package MyGame.Example;
@javax.annotation.Generated(value="flatc")
public final class Any {
private Any() { }
public static final byte NONE = 0;

View File

@@ -2,6 +2,8 @@
package MyGame.Example;
@javax.annotation.Generated(value="flatc")
public final class Color {
private Color() { }
public static final byte Red = 1;

View File

@@ -8,6 +8,7 @@ import java.util.*;
import com.google.flatbuffers.*;
@SuppressWarnings("unused")
@javax.annotation.Generated(value="flatc")
/**
* an example documentation comment: monster object
*/

View File

@@ -8,6 +8,7 @@ import java.util.*;
import com.google.flatbuffers.*;
@SuppressWarnings("unused")
@javax.annotation.Generated(value="flatc")
public final class Referrable extends Table {
public static Referrable getRootAsReferrable(ByteBuffer _bb) { return getRootAsReferrable(_bb, new Referrable()); }
public static Referrable getRootAsReferrable(ByteBuffer _bb, Referrable obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }

View File

@@ -8,6 +8,7 @@ import java.util.*;
import com.google.flatbuffers.*;
@SuppressWarnings("unused")
@javax.annotation.Generated(value="flatc")
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.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }

View File

@@ -8,6 +8,7 @@ import java.util.*;
import com.google.flatbuffers.*;
@SuppressWarnings("unused")
@javax.annotation.Generated(value="flatc")
public final class Test extends Struct {
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public Test __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

View File

@@ -8,6 +8,7 @@ import java.util.*;
import com.google.flatbuffers.*;
@SuppressWarnings("unused")
@javax.annotation.Generated(value="flatc")
final class TestSimpleTableWithEnum extends Table {
public static TestSimpleTableWithEnum getRootAsTestSimpleTableWithEnum(ByteBuffer _bb) { return getRootAsTestSimpleTableWithEnum(_bb, new TestSimpleTableWithEnum()); }
public static TestSimpleTableWithEnum getRootAsTestSimpleTableWithEnum(ByteBuffer _bb, TestSimpleTableWithEnum obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }

View File

@@ -8,6 +8,7 @@ import java.util.*;
import com.google.flatbuffers.*;
@SuppressWarnings("unused")
@javax.annotation.Generated(value="flatc")
public final class TypeAliases extends Table {
public static TypeAliases getRootAsTypeAliases(ByteBuffer _bb) { return getRootAsTypeAliases(_bb, new TypeAliases()); }
public static TypeAliases getRootAsTypeAliases(ByteBuffer _bb, TypeAliases obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }

View File

@@ -8,6 +8,7 @@ import java.util.*;
import com.google.flatbuffers.*;
@SuppressWarnings("unused")
@javax.annotation.Generated(value="flatc")
public final class Vec3 extends Struct {
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public Vec3 __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }