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

Method has_array_field

compiler/fory_compiler/generators/java.py:1809–1816  ·  view source on GitHub ↗

Check if message has fields that require array-aware generated code.

(self, message: Message)

Source from the content-addressed store, hash-verified

1807 return None
1808
1809 def has_array_field(self, message: Message) -> bool:
1810 """Check if message has fields that require array-aware generated code."""
1811 for field in message.fields:
1812 if self.is_primitive_array_field(field) or self.field_type_contains_array(
1813 field.field_type
1814 ):
1815 return True
1816 return False
1817
1818 def is_primitive_array_field(self, field: Field) -> bool:
1819 """Check if field is a primitive array type."""

Callers 3

generate_message_fileMethod · 0.95

Calls 2

Tested by

no test coverage detected