线程对象调用wait()方法会怎么样?

据我所知,对象调用wait(),则访问对象的线程wait,那么如果是线程对象调用wait()方法,谁wait呢?
哪位同学以前思考过吗?
谢谢!

// 使用案例: 线程的Join方法中
public final synchronized void join(long millis)
    throws InterruptedException {
        long base = System.currentTimeMillis();
        long now = 0;

        if (millis < 0) {
            throw new IllegalArgumentException("timeout value is negative");
        }

        if (millis == 0) {
            while (isAlive()) {
                wait(0);
            }
        } else {
            while (isAlive()) {
                long delay = millis - now;
                if (delay <= 0) {
                    break;
                }
                wait(delay);
                now = System.currentTimeMillis() - base;
            }
        }
    }
        ```

join方法的使用,好像是main线程wait了,不太清楚

我想通了

既然是main线程执行的t.join()方法,那么在join()方法里wait的是main线程。但是join方法里没有使用notify or notifyAll,文档上有说明

 * <p> This implementation uses a loop of {@code this.wait} calls
 * conditioned on {@code this.isAlive}. As a thread terminates the
 * {@code this.notifyAll} method is invoked. It is recommended that
 * applications not use {@code wait}, {@code notify}, or
 * {@code notifyAll} on {@code Thread} instances.

自己动手,丰衣足食!