public MemberRef methodInvoked(final Type receiver, final NameAndType method) {
		// Search up class hierarchy for a class that implements the
		// method
		for (Type type = receiver; type != null; type = superclass(type)) {
			// Construct a MemberRef for the possible method
			final MemberRef m = new MemberRef(type, method);
			try {
				context.editMethod(m);
				return (m);

			} catch (final NoSuchMethodException ex) {
				continue; // Try superclass
			}
		}

		// Hmm. No superclass method was found!
		throw new IllegalArgumentException("No implementation of " + receiver
				+ "." + method);
	}