parameters: (self)
return_statement: return dependency_order
docstring: Generates the list of types in the current namespace in an order in which
      depended-upon types appear before types which depend on them.
docstring_summary: Generates the list of types in the current namespace in an order in which
      depended-upon types appear before types which depend on them.
docstring_tokens: Generates the list of types in the current namespace in an order in which depended - upon types appear before types which depend on them .
function: def _FieldDependencyOrder(self):
      """Generates the list of types in the current namespace in an order in which
      depended-upon types appear before types which depend on them.
      """
      dependency_order = []
  
      def ExpandType(path, type_):
        if type_ in path:
          raise ValueError("Illegal circular dependency via cycle " +
                           ", ".join(map(lambda x: x.name, path + [type_])))
        for prop in type_.properties.values():
          if not prop.optional and prop.type_ == PropertyType.REF:
            ExpandType(path + [type_], self._namespace.types[prop.ref_type])
        if not type_ in dependency_order:
          dependency_order.append(type_)
  
      for type_ in self._namespace.types.values():
        ExpandType([], type_)
      return dependency_order
function_tokens: def _FieldDependencyOrder ( self ) : dependency_order = [ ] def ExpandType ( path , type_ ) : if type_ in path : raise ValueError ( "Illegal circular dependency via cycle " + ", " . join ( map ( lambda x : x . name , path + [ type_ ] ) ) ) for prop in type_ . properties . values ( ) : if not prop . optional and prop . type_ == PropertyType . REF : ExpandType ( path + [ type_ ] , self . _namespace . types [ prop . ref_type ] ) if not type_ in dependency_order : dependency_order . append ( type_ ) for type_ in self . _namespace . types . values ( ) : ExpandType ( [ ] , type_ ) return dependency_order