From 415a2a0c3bfb4e241ec3545e5192c81c338cef6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=A1=95?= Date: Thu, 29 Oct 2020 15:57:15 +0800 Subject: [PATCH 1/5] test --- src/com/annotation/test/ReflectAnn.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/annotation/test/ReflectAnn.java b/src/com/annotation/test/ReflectAnn.java index d8d9e24..985ed49 100644 --- a/src/com/annotation/test/ReflectAnn.java +++ b/src/com/annotation/test/ReflectAnn.java @@ -4,6 +4,7 @@ import java.lang.reflect.Method; public class ReflectAnn { + public static void main(String[] args) { //1.使用类加载器加载类 try { @@ -26,7 +27,7 @@ public static void main(String[] args) { } } - //另一种解析方式 + //5.另一种解析方式 for (Method method : m) { Annotation[] as=method.getAnnotations(); for (Annotation annotation : as) { From ae768d26390772872bd5ca25de661c7b520da865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=A1=95?= Date: Thu, 29 Oct 2020 16:02:38 +0800 Subject: [PATCH 2/5] update test --- src/com/annotation/test/Child.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/annotation/test/Child.java b/src/com/annotation/test/Child.java index 21e7a89..0b51220 100644 --- a/src/com/annotation/test/Child.java +++ b/src/com/annotation/test/Child.java @@ -1,10 +1,10 @@ package com.annotation.test; -@Description(desc="这是类注解",author="ashuo",age=23) +@Description(desc="这是类注解",author="alex",age=23) public class Child implements Person{ @Override - @Description(desc="这是方法注解",author="ashuo",age=23) + @Description(desc="这是方法注解",author="alex",age=23) public String name() { // TODO Auto-generated method stub return null; From e0416bc2bd4e19ec50f2f1223177e1f3a8ecb8cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=A1=95?= Date: Thu, 29 Oct 2020 16:10:12 +0800 Subject: [PATCH 3/5] update test --- src/com/annotation/test/Child.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/annotation/test/Child.java b/src/com/annotation/test/Child.java index 0b51220..8ef7488 100644 --- a/src/com/annotation/test/Child.java +++ b/src/com/annotation/test/Child.java @@ -1,10 +1,10 @@ package com.annotation.test; -@Description(desc="这是类注解",author="alex",age=23) +@Description(desc="这是类注解",author="alex",age=27) public class Child implements Person{ @Override - @Description(desc="这是方法注解",author="alex",age=23) + @Description(desc="这是方法注解",author="alex",age=27) public String name() { // TODO Auto-generated method stub return null; From 56daa43774e9b957f08d23de920b3e6273ecef82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=A1=95?= Date: Thu, 29 Oct 2020 17:00:49 +0800 Subject: [PATCH 4/5] test --- src/com/annotation/test/Child.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/annotation/test/Child.java b/src/com/annotation/test/Child.java index 8ef7488..094bd6c 100644 --- a/src/com/annotation/test/Child.java +++ b/src/com/annotation/test/Child.java @@ -1,10 +1,10 @@ package com.annotation.test; -@Description(desc="这是类注解",author="alex",age=27) +@Description(desc="这是类注解",author="alex",age=28) public class Child implements Person{ @Override - @Description(desc="这是方法注解",author="alex",age=27) + @Description(desc="这是方法注解",author="alex",age=28) public String name() { // TODO Auto-generated method stub return null; From 2e387fb9590e36577da22364596b7c72d65ede78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=A1=95?= Date: Thu, 29 Oct 2020 17:03:36 +0800 Subject: [PATCH 5/5] test --- src/com/annotation/test/Child.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/annotation/test/Child.java b/src/com/annotation/test/Child.java index 094bd6c..635537f 100644 --- a/src/com/annotation/test/Child.java +++ b/src/com/annotation/test/Child.java @@ -1,10 +1,10 @@ package com.annotation.test; -@Description(desc="这是类注解",author="alex",age=28) +@Description(desc="这是类注解",author="alex",age=26) public class Child implements Person{ @Override - @Description(desc="这是方法注解",author="alex",age=28) + @Description(desc="这是方法注解",author="alex",age=26) public String name() { // TODO Auto-generated method stub return null;