Skip to content

Commit fbdb6d2

Browse files
author
laileon
committed
说明
1 parent f103634 commit fbdb6d2

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/com/blankj/custom/proxys/staticProxy/Client.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
public class Client {
44
public static void main(String[] args) {
55
ISubject subject = new RealSubject();
6+
//让RealSubject这个借口的实现类来完成任务
67
Proxy proxy = new Proxy(subject);
78
proxy.request();
89
}

src/com/blankj/custom/proxys/staticProxy/Proxy.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
public class Proxy implements ISubject {
44
private ISubject subject;
55

6+
//传入接口的实现类
67
public Proxy(ISubject subject) {
78
this.subject = subject;
89
}

0 commit comments

Comments
 (0)