-
Notifications
You must be signed in to change notification settings - Fork 0
/
Untitled Diagram.drawio
90 lines (90 loc) · 10.6 KB
/
Untitled Diagram.drawio
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<mxfile host="app.diagrams.net" modified="2022-07-15T06:10:33.895Z" agent="5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36" etag="72aKxvpghiU_PVa8iK9z" version="20.1.1" type="github">
<diagram id="Dn47CzuCNDHNMJilmOVK" name="Page-1">
<mxGraphModel dx="2066" dy="1129" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="iESJDRegZQq9znSBZ6S7-4" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=14;" edge="1" parent="1" source="iESJDRegZQq9znSBZ6S7-2" target="iESJDRegZQq9znSBZ6S7-3">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-2" value="<font style="font-size: 14px;">forName()反射获取类信息,交给了JVM去加载</font>" style="rounded=1;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=4;hachureGap=8;hachureAngle=45;fillColor=#fff2cc;sketch=1;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="30" y="100" width="200" height="80" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;fontSize=14;" edge="1" parent="1" source="iESJDRegZQq9znSBZ6S7-3" target="iESJDRegZQq9znSBZ6S7-10">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-3" value="<span style="font-size: 14px;">先获取ClassLoader,然后调用Native方法,获取信息<br></span>" style="rounded=1;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=4;hachureGap=8;hachureAngle=45;fillColor=#fff2cc;sketch=1;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="30" y="220" width="200" height="80" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=14;" edge="1" parent="1" source="iESJDRegZQq9znSBZ6S7-5" target="iESJDRegZQq9znSBZ6S7-6">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-5" value="<font style="font-size: 14px;">权限检查,如果不通过直接抛出异常</font>" style="rounded=1;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=4;hachureGap=8;hachureAngle=45;fillColor=#fff2cc;sketch=1;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="30" y="360" width="200" height="80" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=14;" edge="1" parent="1" source="iESJDRegZQq9znSBZ6S7-6" target="iESJDRegZQq9znSBZ6S7-7">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-6" value="<span style="font-size: 14px;">查找无参构造器,并将其缓存</span>" style="rounded=1;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=4;hachureGap=8;hachureAngle=45;fillColor=#fff2cc;sketch=1;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="30" y="480" width="200" height="80" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-7" value="<span style="font-size: 14px;">调用具体方法的无参构造方法,生成实例并返回</span>" style="rounded=1;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=4;hachureGap=8;hachureAngle=45;fillColor=#fff2cc;sketch=1;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="30" y="600" width="200" height="80" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-10" value="" style="rounded=0;whiteSpace=wrap;html=1;fontSize=14;gradientColor=none;fillStyle=hatch;" vertex="1" parent="1">
<mxGeometry x="10" y="330" width="270" height="380" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-13" value="newInstance<br>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=14;" vertex="1" parent="1">
<mxGeometry x="170" y="680" width="100" height="30" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=14;" edge="1" parent="1" source="iESJDRegZQq9znSBZ6S7-16" target="iESJDRegZQq9znSBZ6S7-18">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-16" value="<span style="font-size: 14px;">先获取所有的constructors,然后通过参数类型比较</span>" style="rounded=1;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=4;hachureGap=8;hachureAngle=45;fillColor=#fff2cc;sketch=1;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="370" y="110" width="200" height="80" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-17" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=14;" edge="1" parent="1" source="iESJDRegZQq9znSBZ6S7-18" target="iESJDRegZQq9znSBZ6S7-19">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-18" value="<span style="font-size: 14px;">找到匹配后,通过ReflectionFactory copy一份constructor返回</span>" style="rounded=1;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=4;hachureGap=8;hachureAngle=45;fillColor=#fff2cc;sketch=1;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="370" y="230" width="200" height="80" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-23" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;fontSize=14;" edge="1" parent="1" source="iESJDRegZQq9znSBZ6S7-19" target="iESJDRegZQq9znSBZ6S7-22">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-19" value="<span style="font-size: 14px;">否则NosuchMethodException异常<br></span>" style="rounded=1;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=4;hachureGap=8;hachureAngle=45;fillColor=#fff2cc;sketch=1;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="370" y="350" width="200" height="80" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-22" value="<span style="font-size: 14px;">通过newInstance()返回实例<br></span>" style="rounded=1;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=4;hachureGap=8;hachureAngle=45;fillColor=#fff2cc;sketch=1;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="370" y="470" width="200" height="80" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-24" value="获取到Constructor" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=14;" vertex="1" parent="1">
<mxGeometry x="470" y="440" width="140" height="30" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-29" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=14;" edge="1" parent="1" source="iESJDRegZQq9znSBZ6S7-25" target="iESJDRegZQq9znSBZ6S7-26">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-25" value="<span style="font-size: 14px;">获取所有方法列表</span>" style="rounded=1;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=4;hachureGap=8;hachureAngle=45;fillColor=#dae8fc;sketch=1;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="680" y="110" width="200" height="80" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-30" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=14;" edge="1" parent="1" source="iESJDRegZQq9znSBZ6S7-26" target="iESJDRegZQq9znSBZ6S7-27">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-26" value="<span style="font-size: 14px;">根据方法名称和方法列表,选出符合要求的方法</span>" style="rounded=1;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=4;hachureGap=8;hachureAngle=45;fillColor=#dae8fc;sketch=1;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="680" y="220" width="200" height="80" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-31" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;fontSize=14;" edge="1" parent="1" source="iESJDRegZQq9znSBZ6S7-27">
<mxGeometry relative="1" as="geometry">
<mxPoint x="780" y="460" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-27" value="<span style="font-size: 14px;">如果没有找到相应方法,抛出异常,否则返回对应方法</span>" style="rounded=1;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=4;hachureGap=8;hachureAngle=45;fillColor=#dae8fc;sketch=1;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="680" y="340" width="200" height="80" as="geometry" />
</mxCell>
<mxCell id="iESJDRegZQq9znSBZ6S7-32" value="<span style="font-size: 14px;">调用method.invoke()方法</span>" style="rounded=1;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=4;hachureGap=8;hachureAngle=45;fillColor=#dae8fc;sketch=1;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="680" y="460" width="200" height="80" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>