MCPcopy Create free account
hub / github.com/apache/fory / generate_nested_enum

Method generate_nested_enum

compiler/fory_compiler/generators/java.py:736–740  ·  view source on GitHub ↗

Generate a nested enum as a static inner class.

(self, enum: Enum)

Source from the content-addressed store, hash-verified

734 return False
735
736 def generate_nested_enum(self, enum: Enum) -> List[str]:
737 """Generate a nested enum as a static inner class."""
738 return self.generate_enum_declaration(
739 enum, f"public static enum {enum.name} {{"
740 )
741
742 def generate_enum_declaration(self, enum: Enum, header: str) -> List[str]:
743 """Generate a Java enum declaration with stable Fory enum ids."""

Callers 3

generate_message_fileMethod · 0.95

Calls 1

Tested by

no test coverage detected