summaryrefslogtreecommitdiff
path: root/runtime/class_loader_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/class_loader_utils.h')
-rw-r--r--runtime/class_loader_utils.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/class_loader_utils.h b/runtime/class_loader_utils.h
index 1c353604fa..934c92b630 100644
--- a/runtime/class_loader_utils.h
+++ b/runtime/class_loader_utils.h
@@ -30,6 +30,14 @@
namespace art {
+// Returns true if the given class loader derives from BaseDexClassLoader.
+inline bool IsInstanceOfBaseDexClassLoader(ScopedObjectAccessAlreadyRunnable& soa,
+ Handle<mirror::ClassLoader> class_loader)
+ REQUIRES_SHARED(Locks::mutator_lock_) {
+ return class_loader->InstanceOf(
+ soa.Decode<mirror::Class>(WellKnownClasses::dalvik_system_BaseDexClassLoader));
+}
+
// Returns true if the given class loader is either a PathClassLoader or a DexClassLoader.
// (they both have the same behaviour with respect to class lookup order)
inline bool IsPathOrDexClassLoader(ScopedObjectAccessAlreadyRunnable& soa,