Lines Matching refs:interface

469   // Create array interface entries to populate once we can load system classes.
2951 return; // no fields or methods - for example a marker interface
3491 // there. Do this by clearing the interface list so the GC will just
3507 // Arrays can't be used as a superclass or interface, so we want to add "abstract final"
3508 // and remove "interface".
3896 // recursive initialization by themselves. This is because when an interface is initialized
3913 // We had a hard failure while verifying this interface. Just return immediately.
4313 // Locate the dex cache of the original interface/Object
4402 // interface prototype. The exception to this are Constructors and the Class of the Proxy itself.
4607 // We have already done this for this interface. Skip it.
4611 // interfaces with default methods are initialized. Non-default interface initialization
4756 // Mark that this interface has undergone recursive default interface initialization so we know we
4758 // interface since we can still avoid the traversal. This is purely a performance optimization.
4828 super_klass->IsInterface() ? "interface" : "superclass",
4850 super_klass->IsInterface() ? "interface" : "superclass",
4864 super_klass->IsInterface() ? "interface" : "superclass",
5464 mirror::Class* interface = ResolveType(dex_file, idx, klass.Get());
5465 if (interface == nullptr) {
5470 if (!klass->CanAccess(interface)) {
5474 PrettyDescriptor(interface).c_str(),
5506 super->IsFinal() ? "declared final" : "an interface");
5562 // Link virtual methods then interface methods.
5563 // We set up the interface lookup table first because we need it to determine if we need to update
5699 ThrowClassFormatError(klass.Get(), "Too many methods on interface: %zu", num_virtual_methods);
5924 // - ifstart: The index of the interface we are checking to see if anything overrides
5925 // - iface: The interface we are checking to see if anything overrides.
5930 // - True: There is some method that matches the target comparator defined in an interface that
5932 // - False: There is no method that matches the target comparator in any interface that is a subtype
5953 // Skip ifstart since our current interface obviously cannot override itself.
5955 // Iterate through every method on this interface. The order does not matter.
5959 // Check if the i'th interface is a subtype of this one.
5985 // We organize the interface table so that, for interface I any subinterfaces J follow it in the
6011 // Iterate through every declared method on this interface. The order does not matter.
6030 // default implementation or is overridden by a non-default interface method. In either case
6046 break; // Continue checking at the next interface.
6056 // Don't set this as the chosen interface if something else is overriding it (because that
6057 // other interface would be potentially chosen instead if it was default). If the other
6058 // interface was abstract then we wouldn't select this interface as chosen anyway since
6243 mirror::Class* interface = if_table->GetInterface(i);
6244 const size_t num_virtuals = interface->NumVirtualMethods();
6252 DCHECK_EQ(interface->NumDeclaredVirtualMethods(), method_array_count);
6266 // Miranda methods cannot be used to implement an interface method, but they are safe to put
6267 // in the IMT since their entrypoint is the interface trampoline. If we put any copied methods
6268 // or interface methods in the IMT here they will not create extra conflicts since we compare
6270 ArtMethod* interface_method = interface->GetVirtualMethod(j, image_pointer_size_);
6273 // There is only any conflicts if all of the interface methods for an IMT slot don't have
6310 mirror::Class* interface = if_table->GetInterface(i);
6324 ArtMethod* interface_method = interface->GetVirtualMethod(j, image_pointer_size_);
6355 // Fills in and flattens the interface inheritance hierarchy.
6358 // the iftable and every interface precedes all of its sub-interfaces in this list.
6368 // interfaces are added in subclass's interface tables.
6389 for (mirror::Class* interface : to_process) {
6397 if (!ContainsElement(classes_in_iftable, interface)) {
6398 // We haven't seen this interface so add all of its super-interfaces onto the
6400 int32_t ifcount = interface->GetIfTableCount();
6402 mirror::Class* super_interface = interface->GetIfTable()->GetInterface(j);
6410 DCHECK(NotSubinterfaceOfAny(classes_in_iftable, interface)) << "Bad ordering";
6411 // Place this interface onto the current-iface-list after all of its super-interfaces.
6412 classes_in_iftable.insert(interface);
6413 iftable->SetInterface(filled_ifcount, interface);
6417 int32_t ifcount = interface->GetIfTableCount();
6419 mirror::Class* super_interface = interface->GetIfTable()->GetInterface(j);
6422 << ", a superinterface of " << PrettyClass(interface);
6434 << "Bad interface order: " << PrettyClass(if_a) << " (index " << i << ") extends "
6436 << "interface list.";
6474 // Check that every class being implemented is an interface.
6476 mirror::Class* interface = have_interfaces
6479 DCHECK(interface != nullptr);
6480 if (UNLIKELY(!interface->IsInterface())) {
6483 "Class %s implements non-interface class %s",
6485 PrettyDescriptor(interface->GetDescriptor(&temp)).c_str());
6488 ifcount += interface->GetIfTableCount();
6490 // Create the interface function table.
6515 mirror::Class* interface = have_interfaces ? interfaces->Get(i) :
6517 to_add.push_back(interface);
6708 // This is an interface implemented by a super-class. Therefore we can just copy the method
6716 // If we are working on a super interface, try extending the existing method array.
6762 // looking for the implementation of a super-interface method but that is rather dirty.
6765 // If we are overwriting a super class interface, try to only virtual methods instead of the
6771 // For a new interface, however, we need the whole vtable in case a new
6772 // interface method is implemented in the whole superclass.
6779 // For each method in interface
6786 // For each method listed in the interface's method list, find the
6811 "Method '%s' implementing interface method '%s' is not public",
6851 // there. We don't bother if this is not a super-classes interface since in that case we
6861 // in some class). Therefore move onto the next interface method.
6897 // Note that we do this even if we are an interface since we need to create this and
6927 // would make lookup for interface super much faster. (We would only need to scan
6963 // interface we searched the entire vtable (and all default methods) for an
6973 // Point the interface table at a phantom slot.
6990 } // For each method in interface end.
6992 } // For each interface.
6998 // TODO don't extend virtuals of interface unless necessary (when is it?).
7065 // interface but will have different ArtMethod*s for them. This also means we cannot compare a
7066 // default method found on a class with one found on the declaring interface directly and must
7098 // (possibly default) interface method. We need to set it entry point to be the bridge so
7174 // Normal default method (changed from an older default or abstract interface method).
7631 // We have to check whether the method id really belongs to an interface (dex static bytecode
7632 // constraint A15). Otherwise you must not invoke-interface on it.
7635 // assumes that the given type is an interface, and will check the interface table if the
7636 // method isn't declared in the class. So it may find an interface method (usually by name
7638 // CheckIncompatibleClassChange will succeed (as it is called on an interface method)
7641 // interface I {
7650 // invoke-interface B.foo
7651 // -> FindInterfaceMethod finds I.foo (interface method), not A.foo (miranda method)
7654 "Found class %s, but interface was expected",
7748 // interface methods and throw if we find the method there. If we find nothing, throw a
7820 LOG(FATAL) << "ResolveAmbiguousMethod: unexpected method in interface: " << PrettyClass(klass);