This is an automated email from the ASF dual-hosted git repository.
chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fory.git
The following commit(s) were added to refs/heads/main by this push:
new 4728a0f51 docs: improve comments in Java generator (#3507)
4728a0f51 is described below
commit 4728a0f51c921e3bb2e4fa064e541b5d27c4afde
Author: codewithtarun2005 <[email protected]>
AuthorDate: Wed Mar 25 12:10:45 2026 +0530
docs: improve comments in Java generator (#3507)
## Why?
To improve code readability and help beginners understand the Java
generator logic.
## What does this PR do?
- Added explanatory comments in Java generator file
- Improved clarity of existing code
- Helps new contributors understand code generation flow
## Related issues
None
## AI Contribution Checklist
- [x] Substantial AI assistance was used in this PR: yes
## Does this PR introduce any user-facing change?
- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?
---
compiler/fory_compiler/generators/java.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/compiler/fory_compiler/generators/java.py
b/compiler/fory_compiler/generators/java.py
index 7deca57e8..e30f4f26d 100644
--- a/compiler/fory_compiler/generators/java.py
+++ b/compiler/fory_compiler/generators/java.py
@@ -418,6 +418,7 @@ class JavaGenerator(BaseGenerator):
return GeneratedFile(path=path, content="\n".join(lines))
+ # Generates a Java class file from a message schema definition.
def generate_message_file(self, message: Message) -> GeneratedFile:
"""Generate a Java class file for a message."""
lines = []
@@ -514,6 +515,7 @@ class JavaGenerator(BaseGenerator):
else:
path = f"{message.name}.java"
+ # Combine all generated lines into a single Java source file.
return GeneratedFile(path=path, content="\n".join(lines))
def generate_outer_class_file(self, outer_classname: str) -> GeneratedFile:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]