summaryrefslogtreecommitdiffstats
path: root/dalvik
diff options
context:
space:
mode:
authorCarl Shapiro <cshapiro@google.com>2010-11-04 15:18:22 -0700
committerCarl Shapiro <cshapiro@google.com>2010-11-04 16:10:50 -0700
commit9e2e604ebd336307ab708544c8f7589bb4ae9fe7 (patch)
tree3b2c418c6dadae699066a8ef13cbfa329b66f4bd /dalvik
parente5189a2e75b6c6a0c45278bdb1e896f61b0ebcc5 (diff)
downloadlibcore-9e2e604ebd336307ab708544c8f7589bb4ae9fe7.zip
libcore-9e2e604ebd336307ab708544c8f7589bb4ae9fe7.tar.gz
libcore-9e2e604ebd336307ab708544c8f7589bb4ae9fe7.tar.bz2
Export the assignable instance counting.
Change-Id: I4358afbf79ac8c33448b48f4b5e1d365371bca1b
Diffstat (limited to 'dalvik')
-rw-r--r--dalvik/src/main/java/dalvik/system/VMDebug.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/dalvik/src/main/java/dalvik/system/VMDebug.java b/dalvik/src/main/java/dalvik/system/VMDebug.java
index 0298680..1eb589e 100644
--- a/dalvik/src/main/java/dalvik/system/VMDebug.java
+++ b/dalvik/src/main/java/dalvik/system/VMDebug.java
@@ -397,9 +397,15 @@ public final class VMDebug {
private static void startClassPrep() {}
/**
- * Returns a count of the extant instances of a class.
+ * Counts the instances of a class.
*
+ * @param klass the class to be counted.
+ * @param assignable if false, direct instances of klass are
+ * counted. If true, instances that are
+ * assignable to klass, as defined by
+ * {@link Class#isAssignableFrom} are counted.
+ * @returns the number of matching instances.
* @hide
*/
- public static native long countInstancesOfClass(Class cls);
+ public static native long countInstancesOfClass(Class klass, boolean assignable);
}