def _execute_backend_on_spec(self):
api_no_aliases_cache = None<EOL>for attr_key in dir(self.backend_module):<EOL><INDENT>attr_value = getattr(self.backend_module, attr_key)<EOL>if (inspect.isclass(attr_value) and<EOL>issubclass(attr_value, Backend) and<EOL>not inspect.isabstract(attr_value)):<EOL><INDENT>self._logger.info('<STR_LIT>', attr_value.__name__)<EOL>backend = attr_value(self.build_path, self.backend_args)<EOL>if backend.preserve_aliases:<EOL><INDENT>api = self.api<EOL><DEDENT>else:<EOL><INDENT>if not api_no_aliases_cache:<EOL><INDENT>api_no_aliases_cache = remove_aliases_from_api(self.api)<EOL><DEDENT>api = api_no_aliases_cache<EOL><DEDENT>try:<EOL><INDENT>backend.generate(api)<EOL><DEDENT>except Exception:<EOL><INDENT>raise BackendException(<EOL>attr_value.__name__, traceback.format_exc()[:-<NUM_LIT:1>])<EOL><DEDENT><DEDENT><DEDENT>
Renders a source file into its final form.