parameters: (self)
docstring: Add the body of the RegisterNativesImpl method to the dictionary.
docstring_summary: Add the body of the RegisterNativesImpl method to the dictionary.
docstring_tokens: Add the body of the RegisterNativesImpl method to the dictionary .
function: def _AddRegisterNativesCalls(self):
      """Add the body of the RegisterNativesImpl method to the dictionary."""
  
      # Only register if there is at least 1 non-proxy native
      if len(self.non_proxy_natives) == 0:
        return ''
  
      template = string.Template("""\
    if (!${REGISTER_NAME}(env))
      return false;
  """)
      value = {
          'REGISTER_NAME':
          jni_generator.GetRegistrationFunctionName(self.fully_qualified_class)
      }
      register_body = template.substitute(value)
      if self.main_dex:
        self._SetDictValue('REGISTER_MAIN_DEX_NATIVES', register_body)
      else:
        self._SetDictValue('REGISTER_NON_MAIN_DEX_NATIVES', register_body)
function_tokens: def _AddRegisterNativesCalls ( self ) : # Only register if there is at least 1 non-proxy native if len ( self . non_proxy_natives ) == 0 : return '' template = string . Template ( """\
    if (!${REGISTER_NAME}(env))
      return false;
  """ ) value = { 'REGISTER_NAME' : jni_generator . GetRegistrationFunctionName ( self . fully_qualified_class ) } register_body = template . substitute ( value ) if self . main_dex : self . _SetDictValue ( 'REGISTER_MAIN_DEX_NATIVES' , register_body ) else : self . _SetDictValue ( 'REGISTER_NON_MAIN_DEX_NATIVES' , register_body )