diff options
Diffstat (limited to 'runtime/common_throws.cc')
-rw-r--r-- | runtime/common_throws.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/runtime/common_throws.cc b/runtime/common_throws.cc index 3a33f2a3aa..0bc913874b 100644 --- a/runtime/common_throws.cc +++ b/runtime/common_throws.cc @@ -237,6 +237,19 @@ void ThrowIllegalAccessError(ObjPtr<mirror::Class> referrer, const char* fmt, .. va_end(args); } +void ThrowIllegalAccessErrorForImplementingMethod(ObjPtr<mirror::Class> klass, + ArtMethod* implementation_method, + ArtMethod* interface_method) + REQUIRES_SHARED(Locks::mutator_lock_) { + DCHECK(!implementation_method->IsAbstract()); + DCHECK(!implementation_method->IsPublic()); + ThrowIllegalAccessError( + klass, + "Method '%s' implementing interface method '%s' is not public", + implementation_method->PrettyMethod().c_str(), + interface_method->PrettyMethod().c_str()); +} + // IllegalAccessException void ThrowIllegalAccessException(const char* msg) { |