No, methods that look for the expected exact parameters for you. Therefore, when you search for a constructor, method, or field using the lookup / search methods of the reflection API, the API uses equals() to find matches.
If you need the same logic as the Java compiler, you will need to use a framework like FEST Reflect or commons beanutils . Or you should call getConstructors() and write your own filter code.
At first glance, this seems silly: if the Java compiler can do it, why not use the Reflection API? There are two reasons: first, for the Java runtime, there is no need to look for which method to call, because the compiler has already selected the correct method.
The second reason is that the Reflection API has always been "second best." He can do everything except his goal has never been so easy / convenient to use (at least what I think every time I use it :-)
Aaron digulla
source share