flatbuffers/docs/source
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
..
gRPC
Benchmarks.md
Building.md Add vcpkg installation instructions (#5732) 2020-01-23 15:46:25 -08:00
Compiler.md [Kotlin] Attach JvmStatic annotation to each method in companion object (#6052) 2020-08-18 09:44:43 -07:00
CONTRIBUTING.md
CppUsage.md fix cpp usage markdown error (#5845) 2020-04-09 09:38:58 -07:00
CsharpUsage.md [C#] support Json Serialization (#5752) 2020-02-10 17:43:36 -08:00
CUsage.md
DartUsage.md
doxyfile Updated doxyfile - added missing files (#5824) 2020-03-20 10:13:47 -07:00
doxygen_layout.xml [Scripts] Adds swift to generated code (#5806) 2020-03-16 11:55:59 -07:00
FlatBuffers.md [C#] support Object API (#5710) 2020-01-30 10:18:28 -08:00
FlexBuffers.md [Java][FlexBuffers] Improve documentation for FlexBuffers in Java. (#5506) 2019-09-10 10:06:47 -07:00
GoApi.md
GoApi_generated.txt
GoUsage.md
Grammar.md Fix float_constant definition in './doc/Grammar.md` (#5828) 2020-03-23 09:51:57 -07:00
groups
Internals.md Fixed text in internals doc that implied structs can be root 2020-04-23 09:28:22 -07:00
JavaScriptUsage.md
JavaUsage.md [C#] support Object API (#5710) 2020-01-30 10:18:28 -08:00
KotlinUsage.md
LobsterUsage.md
LuaUsage.md
PHPUsage.md
PythonUsage.md
README_TO_GENERATE_DOCS.md
RustUsage.md
Schemas.md [C++] Generate code for vector force_align attribute. (#5796) 2020-03-12 08:32:29 -07:00
style.css
Support.md [Swift] Internal library improvements (#5965) 2020-06-18 10:14:38 -07:00
SwiftUsage.md Adds min and max, comments, and all of swift's keywords + fix docs (#5737) 2020-01-27 10:05:41 -08:00
Tutorial.md TypeScript/JavaScript docs improvements (#5984) 2020-06-18 10:23:32 -07:00
TypeScriptUsage.md [TS] Add Obj API (#5788) 2020-04-09 09:53:16 -07:00
WhitePaper.md