(self, unused_the_api, method, unused_resource)
Annotate a Method with Java Proto specific elements.

    Args:
      unused_the_api: (Api) The API tree which owns this method.
      method: (Method) The method to annotate.
      unused_resource: (Resource) The resource which owns this method.

    Raises:
      ValueError: if missing externalTypeName
Annotate a Method with Java Proto specific elements.
Annotate a Method with Java Proto specific elements .
def AnnotateMethod(self, unused_the_api, method, unused_resource):
    """Annotate a Method with Java Proto specific elements.

    Args:
      unused_the_api: (Api) The API tree which owns this method.
      method: (Method) The method to annotate.
      unused_resource: (Resource) The resource which owns this method.

    Raises:
      ValueError: if missing externalTypeName
    """
    for attr in ('requestType', 'responseType'):
      schema = method.get(attr)
      if schema and not isinstance(schema, data_types.Void):
        name = schema.get('externalTypeName')
        if not name:
          raise ValueError('missing externalTypeName for %s (%s of method %s)'
                           % (schema['id'], attr, method['rpcMethod']))
        java_name = schema.get('javaTypeName')
        proto_name = java_name or 'TO_BE_COMPUTED.' + name[name.rfind('.')+1:]
        schema.SetTemplateValue('protoFullClassName', proto_name)
def AnnotateMethod ( self , unused_the_api , method , unused_resource ) : for attr in ( 'requestType' , 'responseType' ) : schema = method . get ( attr ) if schema and not isinstance ( schema , data_types . Void ) : name = schema . get ( 'externalTypeName' ) if not name : raise ValueError ( 'missing externalTypeName for %s (%s of method %s)' % ( schema [ 'id' ] , attr , method [ 'rpcMethod' ] ) ) java_name = schema . get ( 'javaTypeName' ) proto_name = java_name or 'TO_BE_COMPUTED.' + name [ name . rfind ( '.' ) + 1 : ] schema . SetTemplateValue ( 'protoFullClassName' , proto_name )