commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Derek-Ashmore <...@git.apache.org>
Subject [GitHub] commons-lang issue #141: Lang 1195: Enhance MethodUtils to allow invocation ...
Date Sun, 05 Jun 2016 15:38:21 GMT
Github user Derek-Ashmore commented on the issue:

    https://github.com/apache/commons-lang/pull/141
  
    I originally thought the same thing.  The problems is the "Object... args" support.  The
fact that it's optional means that you can put an optional boolean at the end easily and tell
the difference between its intended use to force access or as an argument to the method. 
Fields don't have args, so there's no ... support. See example below. 
    
    invokeMethod(final Object object, final String methodName, Object... args)
    invokeMethod(final Object object, final boolean forceAccess, final String methodName,
Object... args)
    
    We *could* put it at the end in the example below, but then it's inconsistent with the
other overload:
    invokeMethod(final Object object, final boolean forceAccess, final String methodName,
Object[] args, Class<?>[] parameterTypes)
    
    Am I missing something obvious?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message