

def _HandleImports(self, element):
    'Handles imports for the specified element.\n\n    Args:\n      element: (Property|Parameter) The property we want to set the import for.\n    '
    parent = element.schema
    if self._InnerModelClassesSupported():
        while required_import.parent:
            parent = parent.parent
    import_manager = JavaImportManager.GetCachedImportManager(parent)
    data_type = element.data_type
    json_type = data_type.json_type
    while ((json_type == 'array') or (json_type == 'map')):
        data_type = data_type._base_type
        json_type = data_type.json_type
    json_format = data_type.values.get('format')
    type_format_to_datatype_and_imports = self.language_model.type_map
    datatype_and_imports = type_format_to_datatype_and_imports.get((json_type, json_format))
    if datatype_and_imports:
        import_definition = datatype_and_imports[1]
        for required_import in import_definition.imports:
            import_manager.AddImport(required_import)
        for template_value in import_definition.template_values:
            element.SetTemplateValue(template_value, True)

dataset/ETHPy150Open google/apis-client-generator/src/googleapis/codegen/java_generator.py BaseJavaGenerator._HandleImports/VarMisuse@30/90 `parent`->`required_import`