MCPcopy Index your code
hub / github.com/TanaStudy/Java-Study / main

Method main

4. Spring/spring-08-proxy/src/main/java/com/Client.java:5–19  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

3public class Client {
4
5 public static void main(String[] args) {
6 //真实角色
7 Host host = new Host();
8
9 //代理角色
10 ProxyInvocation proxyInvocation = new ProxyInvocation();
11
12 //通过调用程序处理角色来处理我们要调用的接口对象
13 proxyInvocation.setRent(host);
14
15 Rent proxy = (Rent) proxyInvocation.getProxy(); //这里的proxy是动态生成的
16
17 proxy.rent();
18
19 }
20
21}

Callers

nothing calls this directly

Calls 3

setRentMethod · 0.95
getProxyMethod · 0.95
rentMethod · 0.95

Tested by

no test coverage detected