 <p>This is a feature of javac introduced in JDK 8. You need to include <code>-parameters</code> javac command line option to activate it. Then you will be able to get parameter names like this:</p> <pre><code>String name = String.class.getMethod("substring", int.class).getParameters()[0].getName() System.out.println(name); </code></pre> <p>From Spring documentation <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/html/new-in-4.0.html#_java_8_as_well_as_6_and_7" rel="nofollow">3.3 Java 8 (as well as 6 and 7)</a></p> <blockquote> <p>You can also use Java 8’s parameter name discovery (based on the -parameters compiler flag) as an alternative to compiling your code with debug information enabled.</p> </blockquote> <p>As specified in the javadoc for <a href="http://docs.spring.io/spring-framework/docs/3.2.16.RELEASE/javadoc-api/org/springframework/core/ParameterNameDiscoverer.html" rel="nofollow">ParameterNameDiscoverer</a> class:</p> <blockquote> <p>Parameter name discovery is not always possible, but various strategies are available to try, such as looking for debug information that may have been emitted at compile time, and looking for argname annotation values optionally accompanying AspectJ annotated methods.</p> </blockquote> <p>This is the link to related JIRA item in Spring project <a href="https://jira.spring.io/browse/SPR-9643" rel="nofollow">Java 8 parameter name discovery for methods and constructors</a></p> <p>JDK Enhancement Proposal <a href="http://openjdk.java.net/jeps/118" rel="nofollow">JEP 118: Access to Parameter Names at Runtime</a></p>