(self, the_api, resource)
Override default implementation.

    Prepend the resource class name to each sub-resource since Dart doesn't
    support nested classes. Append 'Resource' to the class name so resources
    are less likely to conflict with models.

    Args:
      the_api: (Api) The API this Resource belongs to.
      resource: (Resource) The Resource to annotate.
Override default implementation.
Override default implementation .
def AnnotateResource(self, the_api, resource):
    """Override default implementation.

    Prepend the resource class name to each sub-resource since Dart doesn't
    support nested classes. Append 'Resource' to the class name so resources
    are less likely to conflict with models.

    Args:
      the_api: (Api) The API this Resource belongs to.
      resource: (Resource) The Resource to annotate.
    """
    for r in resource.values['resources']:
      r.values['className'] = (resource.values['className'] +
                               r.values['className'])
      self.AnnotateResource(the_api, r)
    resource.values['className'] += 'Resource'

    parent_list = resource.ancestors[1:]
    parent_list.append(resource)
    parent_classes = [p.values.get('className') for p in parent_list]
    resource.SetTemplateValue('contextCodeType', '.'.join(parent_classes))
    super(DartGenerator, self).AnnotateResource(the_api, resource)
def AnnotateResource ( self , the_api , resource ) : for r in resource . values [ 'resources' ] : r . values [ 'className' ] = ( resource . values [ 'className' ] + r . values [ 'className' ] ) self . AnnotateResource ( the_api , r ) resource . values [ 'className' ] += 'Resource' parent_list = resource . ancestors [ 1 : ] parent_list . append ( resource ) parent_classes = [ p . values . get ( 'className' ) for p in parent_list ] resource . SetTemplateValue ( 'contextCodeType' , '.' . join ( parent_classes ) ) super ( DartGenerator , self ) . AnnotateResource ( the_api , resource )