diff options
Diffstat (limited to 'runtime/hidden_api.h')
| -rw-r--r-- | runtime/hidden_api.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/runtime/hidden_api.h b/runtime/hidden_api.h index eea58e9880..614154c7a0 100644 --- a/runtime/hidden_api.h +++ b/runtime/hidden_api.h @@ -137,9 +137,14 @@ class MemberSignature { public: explicit MemberSignature(ArtField* field) REQUIRES_SHARED(Locks::mutator_lock_); explicit MemberSignature(ArtMethod* method) REQUIRES_SHARED(Locks::mutator_lock_); + explicit MemberSignature(const ClassAccessor::Field& field); + explicit MemberSignature(const ClassAccessor::Method& method); void Dump(std::ostream& os) const; + bool Equals(const MemberSignature& other); + bool MemberNameAndTypeMatch(const MemberSignature& other); + // Performs prefix match on this member. Since the full member signature is // composed of several parts, we match each part in turn (rather than // building the entire thing in memory and performing a simple prefix match) @@ -160,11 +165,8 @@ class MemberSignature { // Locates hiddenapi flags for `field` in the corresponding dex file. // NB: This is an O(N) operation, linear with the number of members in the class def. -uint32_t GetDexFlags(ArtField* field) REQUIRES_SHARED(Locks::mutator_lock_); - -// Locates hiddenapi flags for `method` in the corresponding dex file. -// NB: This is an O(N) operation, linear with the number of members in the class def. -uint32_t GetDexFlags(ArtMethod* method) REQUIRES_SHARED(Locks::mutator_lock_); +template<typename T> +uint32_t GetDexFlags(T* member) REQUIRES_SHARED(Locks::mutator_lock_); template<typename T> bool ShouldDenyAccessToMemberImpl(T* member, ApiList api_list, AccessMethod access_method) |