diff options
author | 2017-06-19 11:05:51 -0700 | |
---|---|---|
committer | 2017-06-19 11:11:12 -0700 | |
commit | e17cf243978ca7f5356e746ee460f0fcf04e04a6 (patch) | |
tree | e8ad423bf1dee5756fec451ba22db749ed4f5472 /runtime/dex_method_iterator.h | |
parent | 2bc159ebd1115f71d80639e47fc38663aa84ba4a (diff) |
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
Diffstat (limited to 'runtime/dex_method_iterator.h')
-rw-r--r-- | runtime/dex_method_iterator.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/runtime/dex_method_iterator.h b/runtime/dex_method_iterator.h index 7fae277c14..8a4bed31b1 100644 --- a/runtime/dex_method_iterator.h +++ b/runtime/dex_method_iterator.h @@ -66,13 +66,7 @@ class DexMethodIterator { } if (it_.get() == nullptr) { it_.reset(new ClassDataItemIterator(GetDexFileInternal(), class_data_)); - // Skip fields - while (GetIterator().HasNextStaticField()) { - GetIterator().Next(); - } - while (GetIterator().HasNextInstanceField()) { - GetIterator().Next(); - } + GetIterator().SkipAllFields(); direct_method_ = true; } if (direct_method_ && GetIterator().HasNextDirectMethod()) { |