mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-11 15:37:27 +00:00
* [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521)
This commit is contained in:
34
tests/union_vector/MovieT.java
Normal file
34
tests/union_vector/MovieT.java
Normal file
@@ -0,0 +1,34 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
import java.nio.*;
|
||||
import java.lang.*;
|
||||
import java.util.*;
|
||||
import com.google.flatbuffers.*;
|
||||
|
||||
public class MovieT {
|
||||
private CharacterUnion mainCharacter;
|
||||
private CharacterUnion[] characters;
|
||||
|
||||
public CharacterUnion getMainCharacter() { return mainCharacter; }
|
||||
|
||||
public void setMainCharacter(CharacterUnion mainCharacter) { this.mainCharacter = mainCharacter; }
|
||||
|
||||
public CharacterUnion[] getCharacters() { return characters; }
|
||||
|
||||
public void setCharacters(CharacterUnion[] characters) { this.characters = characters; }
|
||||
|
||||
|
||||
public MovieT() {
|
||||
this.mainCharacter = null;
|
||||
this.characters = null;
|
||||
}
|
||||
public static MovieT deserializeFromBinary(byte[] fbBuffer) {
|
||||
return Movie.getRootAsMovie(ByteBuffer.wrap(fbBuffer)).unpack();
|
||||
}
|
||||
public byte[] serializeToBinary() {
|
||||
FlatBufferBuilder fbb = new FlatBufferBuilder();
|
||||
Movie.finishMovieBuffer(fbb, Movie.pack(fbb, this));
|
||||
return fbb.sizedByteArray();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user