@@ -22,8 +22,6 @@ public class ReflectionTest {
2222
2323 /**
2424 * 获取public和private字段
25- *
26- * @throws ClassNotFoundException
2725 */
2826 @ Test
2927 void getDeclaredField () throws ClassNotFoundException {
@@ -36,8 +34,6 @@ void getDeclaredField() throws ClassNotFoundException {
3634
3735 /**
3836 * 获取public字段
39- *
40- * @throws ClassNotFoundException
4137 */
4238 @ Test
4339 void getFields () throws ClassNotFoundException {
@@ -51,8 +47,6 @@ void getFields() throws ClassNotFoundException {
5147
5248 /**
5349 * 获取父类的字段
54- *
55- * @throws ClassNotFoundException
5650 */
5751 @ Test
5852 void getSuperFields () throws ClassNotFoundException {
@@ -65,9 +59,6 @@ void getSuperFields() throws ClassNotFoundException {
6559
6660 /**
6761 * 获取指定字段
68- *
69- * @throws ClassNotFoundException
70- * @throws NoSuchFieldException
7162 */
7263 @ Test
7364 void getDeclaredFieldByAnnotation () throws ClassNotFoundException , NoSuchFieldException {
@@ -89,10 +80,6 @@ void getDeclaredFieldByAnnotation() throws ClassNotFoundException, NoSuchFieldEx
8980
9081 /**
9182 * 获取static字段值
92- *
93- * @throws ClassNotFoundException
94- * @throws NoSuchFieldException
95- * @throws IllegalAccessException
9683 */
9784 @ Test
9885 void getStaticField () throws ClassNotFoundException , NoSuchFieldException , IllegalAccessException {
@@ -111,11 +98,6 @@ void getStaticField() throws ClassNotFoundException, NoSuchFieldException, Illeg
11198
11299 /**
113100 * 获取方法
114- *
115- * @throws ClassNotFoundException
116- * @throws NoSuchMethodException
117- * @throws IllegalAccessException
118- * @throws InvocationTargetException
119101 */
120102 @ Test
121103 void getDeclaredMethod () throws ClassNotFoundException , NoSuchMethodException , IllegalAccessException , InvocationTargetException {
@@ -139,13 +121,6 @@ void getDeclaredMethod() throws ClassNotFoundException, NoSuchMethodException, I
139121
140122 /**
141123 * 类型转换,通过Class.cast()方法实现, 在编译时实现
142- *
143- * @throws ClassNotFoundException
144- * @throws NoSuchMethodException
145- * @throws IllegalAccessException
146- * @throws InvocationTargetException
147- * @throws InstantiationException
148- * @throws NoSuchFieldException
149124 */
150125 @ Test
151126 void cast () throws ClassNotFoundException , NoSuchMethodException , IllegalAccessException , InvocationTargetException , InstantiationException , NoSuchFieldException {
@@ -160,12 +135,6 @@ void cast() throws ClassNotFoundException, NoSuchMethodException, IllegalAccessE
160135
161136 /**
162137 * 类型转换, 通过使用泛型实现类型转换
163- *
164- * @throws ClassNotFoundException
165- * @throws NoSuchMethodException
166- * @throws IllegalAccessException
167- * @throws InvocationTargetException
168- * @throws InstantiationException
169138 */
170139 @ Test
171140 void reflect () throws ClassNotFoundException , NoSuchMethodException , IllegalAccessException , InvocationTargetException , InstantiationException , NoSuchFieldException {
0 commit comments