Created
July 30, 2015 10:42
-
-
Save joa/b33da09d811e8f269fe9 to your computer and use it in GitHub Desktop.
Revisions
-
joa created this gist
Jul 30, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ import java.lang.reflect.Constructor; import java.util.Arrays; import java.util.List; public final class Foo { public static void main(String[] args) { final Constructor<?>[] ctors = A.class.getDeclaredConstructors(); for(Constructor<?> ctor : ctors) { System.out.println(Arrays.toString(ctor.getParameterTypes())); System.out.println(Arrays.toString(ctor.getGenericParameterTypes())); System.out.println(); } } private class A { A(String a) {} A(List<String> a) {} } }