...

Text file src/github.com/google/flatbuffers/tests/MyGame/Example/AnyAmbiguousAliasesUnion.java

Documentation: github.com/google/flatbuffers/tests/MyGame/Example

     1// automatically generated by the FlatBuffers compiler, do not modify
     2
     3package MyGame.Example;
     4
     5import com.google.flatbuffers.FlatBufferBuilder;
     6
     7public class AnyAmbiguousAliasesUnion {
     8  private byte type;
     9  private Object value;
    10
    11  public byte getType() { return type; }
    12
    13  public void setType(byte type) { this.type = type; }
    14
    15  public Object getValue() { return value; }
    16
    17  public void setValue(Object value) { this.value = value; }
    18
    19  public AnyAmbiguousAliasesUnion() {
    20    this.type = AnyAmbiguousAliases.NONE;
    21    this.value = null;
    22  }
    23
    24  public MyGame.Example.MonsterT asM1() { return (MyGame.Example.MonsterT) value; }
    25  public MyGame.Example.MonsterT asM2() { return (MyGame.Example.MonsterT) value; }
    26  public MyGame.Example.MonsterT asM3() { return (MyGame.Example.MonsterT) value; }
    27
    28  public static int pack(FlatBufferBuilder builder, AnyAmbiguousAliasesUnion _o) {
    29    switch (_o.type) {
    30      case AnyAmbiguousAliases.M1: return MyGame.Example.Monster.pack(builder, _o.asM1());
    31      case AnyAmbiguousAliases.M2: return MyGame.Example.Monster.pack(builder, _o.asM2());
    32      case AnyAmbiguousAliases.M3: return MyGame.Example.Monster.pack(builder, _o.asM3());
    33      default: return 0;
    34    }
    35  }
    36}
    37

View as plain text