commons-lang
commons-lang copied to clipboard
LANG-1652 - Check whether the given class has a public constructor
Determine whether the given class has a public constructor with the given signature, checking accessibility.
Coverage increased (+0.0003%) to 94.952% when pulling 1e1a4b820f184b05b6081c1ad6e2359399c24ed5 on arturobernalg:feature/LANG-1652 into 4ff5e2b9f98e5ca9dd105a2d08477e0371ae8832 on apache:master.
@arturobernalg I am curious: Can this be used within Commons Lang itself?
@arturobernalg I am curious: Can this be used within Commons Lang itself?
Hi @garydgregory We have a complete class dedicated to manipulate and access to the method of a class through reflections, so, IMO why not.
@arturobernalg I am curious: Can this be used within Commons Lang itself?
Hi @garydgregory We have a complete class dedicated to manipulate and access to the method of a class through reflections, so, IMO why not.
Not, because (1) It's not useable within Commons Lang itself, because current callers of getAccessibleConstructor(*) test and use the result of the call. So using this new API internally would cause getAccessibleConstructor() to be called more than once instead of once. And (2) because "why not" is not a use-case, so YAGNI.