我正在使用 API 编写一个项目。所以总的来说我的程序看起来像这样。
public class Programm extends bridge {
Client Eclient = new Client() ;
public static void main(String[] args) {
Programm MyProgramm = new Programm();
MyProgramm.MyMethod();
public void MyMethod(){
Runnable countdown = new flipper();
Thread worker = new Thread(countdown);
worker.start();
}
}
abstract bridge implements API{}
class flipper implements runnable {
public void run(){MyProgramm.Eclient.ApiMethod()}
}
基本上我需要访问 EClient 类实例,因为它会被 MyProgramm 实例从类翻转器访问