Proxyは代理人となってインスタンスの処理を肩代わりすることができる。subjectインターフェースを作ってProxyクラスとRealsubjectクラスが継承する。ProxyクラスがRealsubjectクラスの処理を一部肩代わりして、できないときはRealsubjectに委譲する。こうすることで重い処理で処理時間がかかる時に時短することができる。
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme