summaryrefslogtreecommitdiff
path: root/runtime/art_method.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/art_method.cc')
-rw-r--r--runtime/art_method.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/runtime/art_method.cc b/runtime/art_method.cc
index dbb546da29..f7ed81254f 100644
--- a/runtime/art_method.cc
+++ b/runtime/art_method.cc
@@ -67,6 +67,18 @@ mirror::String* ArtMethod::GetNameAsString(Thread* self) {
dex_cache);
}
+void ArtMethod::ThrowInvocationTimeError() {
+ DCHECK(!IsInvokable());
+ // NOTE: IsDefaultConflicting must be first since the actual method might or might not be abstract
+ // due to the way we select it.
+ if (IsDefaultConflicting()) {
+ ThrowIncompatibleClassChangeErrorForMethodConflict(this);
+ } else {
+ DCHECK(IsAbstract());
+ ThrowAbstractMethodError(this);
+ }
+}
+
InvokeType ArtMethod::GetInvokeType() {
// TODO: kSuper?
if (GetDeclaringClass()->IsInterface()) {
@@ -330,6 +342,10 @@ void ArtMethod::UnregisterNative() {
RegisterNative(GetJniDlsymLookupStub(), false);
}
+bool ArtMethod::IsOverridableByDefaultMethod() {
+ return GetDeclaringClass()->IsInterface();
+}
+
bool ArtMethod::EqualParameters(Handle<mirror::ObjectArray<mirror::Class>> params) {
auto* dex_cache = GetDexCache();
auto* dex_file = dex_cache->GetDexFile();