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

Method generate_enum_file

compiler/fory_compiler/generators/scala.py:346–352  ·  view source on GitHub ↗
(self, enum: Enum)

Source from the content-addressed store, hash-verified

344 return files
345
346 def generate_enum_file(self, enum: Enum) -> GeneratedFile:
347 lines = self.source_header({"org.apache.fory.annotation.ForyEnumId"})
348 comment = self.format_type_id_comment(enum, "//")
349 if comment:
350 lines.append(comment)
351 lines.extend(self.generate_enum(enum))
352 return self.source_file(enum.name, lines)
353
354 def generate_union_file(self, union: Union) -> GeneratedFile:
355 imports = {

Callers 1

generateMethod · 0.95

Calls 6

source_headerMethod · 0.95
generate_enumMethod · 0.95
source_fileMethod · 0.95
extendMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected