mirror of https://github.com/vee1e/flatbuffers - FlatBuffers: Memory Efficient Serialization Library
Find a file
Yoon Kyong Sik e86d5b8e97
[Kotlin] Attach JvmStatic annotation to each method in companion object (#6052)
* Attach JvmStatic annotation to each method of companion object

Kotlin does not have static accessor so companion object used instead of static.
It's so natural. But when use kotlin companion object methods on java it is very inconvenient.
```java
GeneratedClassByFlatBuffer.Companion.someMethod()
```

If use @JvmStatic annotation it can be shorten like below.
```java
GeneratedClassByFlatBuffer.someMethod()
```

* Formatting by Idea Google C++ style

* Add comments - Commit for missing cla

Signed-off-by: Yoon KyongSik <sam1287@gmail.com>

* Add comments - Commit for missing cla

Signed-off-by: Yoon KyongSik <sam1287@gmail.com>

* Reset code formatting except modified lines

Signed-off-by: Yoon KyongSik <sam1287@gmail.com>

* Pass missing flag to validateVersion method

Signed-off-by: Yoon KyongSik <sam1287@gmail.com>

* Add annotations to missing method in companion object

* addVector
* createVector
* endVector
* tableCreator

And also I tried add compiler option for generate annotation who don't like this operation.

Signed-off-by: Yoon KyongSik <sam1287@gmail.com>

* Modify unmatched option name in compiler usage

Signed-off-by: Yoon KyongSik <sam1287@gmail.com>

* Add missing operation for finishSizePrefixed and finishStructBuffer method.

Signed-off-by: Yoon KyongSik <sam1287@gmail.com>

* Add compiled example with --kotlin-gen-jvmstatic option.

Signed-off-by: Yoon KyongSik <sam1287@gmail.com>

* Fix Compiler.md

Change option name from --gen-jvm-static-annotation to --kotlin-gen-jvmstatic

Signed-off-by: Yoon KyongSik <sam1287@gmail.com>

* Use IDLOptions reference instead of bool parameter.

Signed-off-by: Yoon KyongSik <sam1287@gmail.com>

* Change option name - kotlin_gen_jvmstatic to gen_jvmstatic

Signed-off-by: Yoon KyongSik <sam1287@gmail.com>

* Use IDLOptions reference instead of bool parameter and missing process @JvmStatic as suffix.

Signed-off-by: Yoon KyongSik <sam1287@gmail.com>

* Add code generation for --gen-jvmstatic option

Signed-off-by: Yoon KyongSik <sam1287@gmail.com>

* Miss typo directory for including.

Signed-off-by: Yoon KyongSik <sam1287@gmail.com>

* Miss typo variable suffix for including.

Signed-off-by: Yoon KyongSik <sam1287@gmail.com>

* Fix camel case to snake case.

Signed-off-by: Yoon KyongSik <sam1287@gmail.com>

* Rollback generate code for gen_jvmstatic option.

Signed-off-by: Yoon KyongSik <sam1287@gmail.com>

* Delete generated test files.

Signed-off-by: Yoon KyongSik <sam1287@gmail.com>

* add missing new line at end of file.

Signed-off-by: Yoon KyongSik <sam1287@gmail.com>

* Remove generated test file by command line.

Signed-off-by: Yoon KyongSik <sam1287@gmail.com>

Co-authored-by: sam <sam@jennifersoft.com>
2020-08-18 09:44:43 -07:00
.appveyor
.bazelci
.github Deleted old stale bot 2020-06-15 13:39:46 -07:00
.travis
android
bazel Allow to run cpp tests under grpc/tests/ using bazel. (#6040) 2020-07-21 11:08:01 -07:00
CMake Fix git command executed in wrong folder when doing cmake superbuild (#6039) 2020-07-20 12:26:01 -07:00
conan
dart [Dart] Generate constant values map for enums (#6025) 2020-07-10 17:42:22 -07:00
docs [Kotlin] Attach JvmStatic annotation to each method in companion object (#6052) 2020-08-18 09:44:43 -07:00
go
grpc [Swift] Append namespace for Swift Grpc implementation (#6049) 2020-07-31 10:07:45 +03:00
include/flatbuffers [Kotlin] Attach JvmStatic annotation to each method in companion object (#6052) 2020-08-18 09:44:43 -07:00
java/com/google/flatbuffers [Java] Add support for shared strings on FlatBufferBuilder. (#6012) 2020-07-02 12:40:56 -07:00
js [Feature] Checks for Nullable strings (#6050) 2020-07-27 09:57:50 -07:00
lobster
lua
net/FlatBuffers [Feature] Checks for Nullable strings (#6050) 2020-07-27 09:57:50 -07:00
php
python export a __version__ variable for python module (#5309) 2020-07-30 15:56:21 -07:00
reflection
rust Rust codegen improvements and lint fixes (#6046) 2020-07-25 13:46:20 -07:00
samples [Swift] FlatBuffers createMonster method doesn't treat struct properly (#5992) 2020-06-28 12:36:55 +03:00
snap
src [Kotlin] Attach JvmStatic annotation to each method in companion object (#6052) 2020-08-18 09:44:43 -07:00
swift Adds a serialize helper function to native table (#6059) 2020-08-04 13:53:40 +03:00
tests [C#] Cleaned up .NET testing script for Mono (#6016) 2020-08-17 13:10:10 -07:00
.clang-format
.editorconfig
.gitattributes
.gitignore adding fb import when no other imports are present (#6030) 2020-07-30 15:55:11 -07:00
.travis.yml
appveyor.yml [C#] Cleaned up .NET testing script for Mono (#6016) 2020-08-17 13:10:10 -07:00
BUILD Allow to run cpp tests under grpc/tests/ using bazel. (#6040) 2020-07-21 11:08:01 -07:00
build_defs.bzl
CMakeLists.txt
composer.json
conanfile.py
CONTRIBUTING.md
LICENSE.txt
package.json
pom.xml
readme.md
WORKSPACE Allow to run cpp tests under grpc/tests/ using bazel. (#6040) 2020-07-21 11:08:01 -07:00

logo FlatBuffers

Build Status Build status Join the chat at https://gitter.im/google/flatbuffers Discord Chat Twitter Follow

FlatBuffers is a cross platform serialization library architected for maximum memory efficiency. It allows you to directly access serialized data without parsing/unpacking it first, while still having great forwards/backwards compatibility.

Go to our landing page to browse our documentation.

Supported operating systems

  • Windows
  • MacOS X
  • Linux
  • Android
  • And any others with a recent C++ compiler.

Supported programming languages

  • C++
  • C#
  • C
  • Dart
  • Go
  • Java
  • JavaScript
  • Lobster
  • Lua
  • PHP
  • Python
  • Rust
  • TypeScript

and more in progress...

Contribution

To contribute to this project, see CONTRIBUTING.

Licensing

Flatbuffers is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.