(String[] args)
| 7 | class Annotations { |
| 8 | |
| 9 | public static void main(String[] args) throws Exception { |
| 10 | Method foo = A.class.getMethod("foo", String.class, Object.class); |
| 11 | Annotation[][] annotations = foo.getParameterAnnotations(); |
| 12 | System.out.println(Arrays.deepToString(annotations)); |
| 13 | Annotation a = annotations[0][1]; |
| 14 | Class<?> annoType = a.annotationType(); |
| 15 | // System.out.println(annoType); |
| 16 | ClassAnno classAnno = annoType.getAnnotation(ClassAnno.class); |
| 17 | // System.out.println(classAnno); |
| 18 | Class<?> value = classAnno.value(); |
| 19 | // System.out.println(value); |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | class A { |
nothing calls this directly
no test coverage detected