parameters: (self)
return_statement: return '\n'.join(ret)
docstring: Returns the code for registering the called by native methods.
docstring_summary: Returns the code for registering the called by native methods.
docstring_tokens: Returns the code for registering the called by native methods .
function: def GetRegisterCalledByNativesImplString(self):
      """Returns the code for registering the called by native methods."""
      if not self.options.eager_called_by_natives:
        return ''
      template = Template("""\
    g_${JAVA_CLASS}_${METHOD_ID_VAR_NAME} = ${GET_METHOD_ID_IMPL}
    if (g_${JAVA_CLASS}_${METHOD_ID_VAR_NAME} == NULL) {
      return false;
    }
      """)
      ret = []
      for called_by_native in self.called_by_natives:
        values = {
            'JAVA_CLASS': called_by_native.java_class_name or self.class_name,
            'METHOD_ID_VAR_NAME': called_by_native.method_id_var_name,
            'GET_METHOD_ID_IMPL': self.GetMethodIDImpl(called_by_native),
        }
        ret += [template.substitute(values)]
      return '\n'.join(ret)
function_tokens: def GetRegisterCalledByNativesImplString ( self ) : if not self . options . eager_called_by_natives : return '' template = Template ( """\
    g_${JAVA_CLASS}_${METHOD_ID_VAR_NAME} = ${GET_METHOD_ID_IMPL}
    if (g_${JAVA_CLASS}_${METHOD_ID_VAR_NAME} == NULL) {
      return false;
    }
      """ ) ret = [ ] for called_by_native in self . called_by_natives : values = { 'JAVA_CLASS' : called_by_native . java_class_name or self . class_name , 'METHOD_ID_VAR_NAME' : called_by_native . method_id_var_name , 'GET_METHOD_ID_IMPL' : self . GetMethodIDImpl ( called_by_native ) , } ret += [ template . substitute ( values ) ] return '\n' . join ( ret )