• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 package org.chromium.base;
6 
7 import org.chromium.base.annotations.CalledByNative;
8 import org.chromium.base.annotations.MainDex;
9 
10 /**
11  * This class provides JNI-related methods to the native library.
12  */
13 @MainDex
14 public class JNIUtils {
15     /**
16      * This returns a ClassLoader that is capable of loading Chromium Java code. Such a ClassLoader
17      * is needed for the few cases where the JNI mechanism is unable to automatically determine the
18      * appropriate ClassLoader instance.
19      */
20     @CalledByNative
getClassLoader()21     public static Object getClassLoader() {
22         return JNIUtils.class.getClassLoader();
23     }
24 }
25