Add field/method skipping helper functions to DexFile
Specifically added SkipStaticFields, SkipInstanceFields,
SkipAllFields, SkipStaticMethods, and SkipVirtualMethods.
Also applied the helpers to the code base.
Test: test-art-host
Change-Id: Idda77f9a6e2564c2e588d2bbe11cc320063fdb32
diff --git a/runtime/openjdkjvmti/ti_redefine.cc b/runtime/openjdkjvmti/ti_redefine.cc
index 341de0d..5422f48 100644
--- a/runtime/openjdkjvmti/ti_redefine.cc
+++ b/runtime/openjdkjvmti/ti_redefine.cc
@@ -601,9 +601,7 @@
}
// Skip all of the fields. We should have already checked this.
- while (new_iter.HasNextStaticField() || new_iter.HasNextInstanceField()) {
- new_iter.Next();
- }
+ new_iter.SkipAllFields();
// Check each of the methods. NB we don't need to specifically check for removals since the 2 dex
// files have the same number of methods, which means there must be an equal amount of additions
// and removals.