parameters: (registration_dict, use_hash)
return_statement: return template.substitute(registration_dict)
docstring: Returns the content of the header file.
docstring_summary: Returns the content of the header file.
docstring_tokens: Returns the content of the header file .
function: def CreateFromDict(registration_dict, use_hash):
    """Returns the content of the header file."""
  
    template = string.Template("""\
  // Copyright 2017 The Chromium Authors. All rights reserved.
  // Use of this source code is governed by a BSD-style license that can be
  // found in the LICENSE file.
  
  
  // This file is autogenerated by
  //     base/android/jni_generator/jni_registration_generator.py
  // Please do not change its content.
  
  #ifndef ${HEADER_GUARD}
  #define ${HEADER_GUARD}
  
  #include <jni.h>
  
  #include "base/android/jni_generator/jni_generator_helper.h"
  #include "base/android/jni_int_wrapper.h"
  #include "base/stl_util.h"  // For base::size().
  
  
  // Step 1: Forward declarations (classes).
  ${CLASS_PATH_DECLARATIONS}
  
  // Step 2: Forward declarations (methods).
  
  ${FORWARD_DECLARATIONS}
  
  // Step 3: Method declarations.
  
  ${JNI_NATIVE_METHOD_ARRAY}\
  ${PROXY_NATIVE_METHOD_ARRAY}\
  
  ${JNI_NATIVE_METHOD}
  // Step 4: Main dex and non-main dex registration functions.
  
  namespace ${NAMESPACE} {
  
  bool RegisterMainDexNatives(JNIEnv* env) {\
  ${REGISTER_MAIN_DEX_PROXY_NATIVES}
  ${REGISTER_MAIN_DEX_NATIVES}
    return true;
  }
  
  bool RegisterNonMainDexNatives(JNIEnv* env) {\
  ${REGISTER_PROXY_NATIVES}
  ${REGISTER_NON_MAIN_DEX_NATIVES}
    return true;
  }
  
  }  // namespace ${NAMESPACE}
  
  #endif  // ${HEADER_GUARD}
  """)
    _SetProxyRegistrationFields(registration_dict, use_hash)
  
    if len(registration_dict['FORWARD_DECLARATIONS']) == 0:
      return ''
  
    return template.substitute(registration_dict)
function_tokens: def CreateFromDict ( registration_dict , use_hash ) : template = string . Template ( """\
  // Copyright 2017 The Chromium Authors. All rights reserved.
  // Use of this source code is governed by a BSD-style license that can be
  // found in the LICENSE file.
  
  
  // This file is autogenerated by
  //     base/android/jni_generator/jni_registration_generator.py
  // Please do not change its content.
  
  #ifndef ${HEADER_GUARD}
  #define ${HEADER_GUARD}
  
  #include <jni.h>
  
  #include "base/android/jni_generator/jni_generator_helper.h"
  #include "base/android/jni_int_wrapper.h"
  #include "base/stl_util.h"  // For base::size().
  
  
  // Step 1: Forward declarations (classes).
  ${CLASS_PATH_DECLARATIONS}
  
  // Step 2: Forward declarations (methods).
  
  ${FORWARD_DECLARATIONS}
  
  // Step 3: Method declarations.
  
  ${JNI_NATIVE_METHOD_ARRAY}\
  ${PROXY_NATIVE_METHOD_ARRAY}\
  
  ${JNI_NATIVE_METHOD}
  // Step 4: Main dex and non-main dex registration functions.
  
  namespace ${NAMESPACE} {
  
  bool RegisterMainDexNatives(JNIEnv* env) {\
  ${REGISTER_MAIN_DEX_PROXY_NATIVES}
  ${REGISTER_MAIN_DEX_NATIVES}
    return true;
  }
  
  bool RegisterNonMainDexNatives(JNIEnv* env) {\
  ${REGISTER_PROXY_NATIVES}
  ${REGISTER_NON_MAIN_DEX_NATIVES}
    return true;
  }
  
  }  // namespace ${NAMESPACE}
  
  #endif  // ${HEADER_GUARD}
  """ ) _SetProxyRegistrationFields ( registration_dict , use_hash ) if len ( registration_dict [ 'FORWARD_DECLARATIONS' ] ) == 0 : return '' return template . substitute ( registration_dict )