Created
September 19, 2013 04:38
-
-
Save jpt1122/6619191 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Child extends Parent{ | |
} | |
/** | |
* @param args | |
*/ | |
public static void main(String[] args) { | |
Parent parent = new Parent(); | |
Child child = new Child(); | |
System.out.println("Parent class:"); | |
System.out.println(" getDeclaredAnnotations: " + | |
parent.getClass().getDeclaredAnnotations().length); | |
System.out.println(" getAnnotations: " + | |
parent.getClass().getAnnotations().length + "\n"); | |
System.out.println("Child class:"); | |
System.out.println(" getDeclaredAnnotations: " + | |
child.getClass().getDeclaredAnnotations().length); | |
System.out.println(" getAnnotations: " + | |
child.getClass().getAnnotations().length); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment