@@ -65,9 +65,9 @@ private static final class MethodDescriptor {
6565 /**
6666 * The sole constructor.
6767 *
68- * @param cls the class to reflect, must not be null
69- * @param methodName the method name to obtain
70- * @param paramTypes the array of classes representing the parameter types
68+ * @param cls the class to reflect, must not be null.
69+ * @param methodName the method name to obtain.
70+ * @param paramTypes the array of classes representing the parameter types.
7171 * @param exact whether the match has to be exact.
7272 */
7373 public MethodDescriptor (final Class <?> cls , final String methodName , final Class <?>[] paramTypes , final boolean exact ) {
@@ -81,7 +81,7 @@ public MethodDescriptor(final Class<?> cls, final String methodName, final Class
8181 /**
8282 * Checks for equality.
8383 *
84- * @param obj object to be tested for equality
84+ * @param obj object to be tested for equality.
8585 * @return true, if the object describes the same Method.
8686 */
8787 @ Override
@@ -136,8 +136,8 @@ public int hashCode() {
136136 /**
137137 * Add a method to the cache.
138138 *
139- * @param md The method descriptor
140- * @param method The method to cache
139+ * @param md The method descriptor.
140+ * @param method The method to cache.
141141 */
142142 private static void cacheMethod (final MethodDescriptor md , final Method method ) {
143143 if (CACHE_METHODS && method != null ) {
@@ -148,7 +148,7 @@ private static void cacheMethod(final MethodDescriptor md, final Method method)
148148 /**
149149 * Clear the method cache.
150150 *
151- * @return the number of cached methods cleared
151+ * @return the number of cached methods cleared.
152152 * @since 1.8.0
153153 */
154154 public static synchronized int clearCache () {
@@ -161,9 +161,9 @@ public static synchronized int clearCache() {
161161 * Return an accessible method (that is, one that can be invoked via reflection) that implements the specified Method. If no such method can be found,
162162 * return {@code null}.
163163 *
164- * @param clazz The class of the object
165- * @param method The method that we wish to call
166- * @return The accessible method
164+ * @param clazz The class of the object.
165+ * @param method The method that we wish to call.
166+ * @return The accessible method.
167167 * @since 1.8.0
168168 */
169169 public static Method getAccessibleMethod (Class <?> clazz , Method method ) {
@@ -213,10 +213,10 @@ public static Method getAccessibleMethod(Class<?> clazz, Method method) {
213213 * Return an accessible method (that is, one that can be invoked via reflection) with given name and parameters. If no such method can be found, return
214214 * {@code null}. This is just a convenient wrapper for {@link #getAccessibleMethod(Method method)}.
215215 *
216- * @param clazz get method from this class
217- * @param methodName get method with this name
218- * @param parameterTypes with these parameters types
219- * @return The accessible method
216+ * @param clazz get method from this class.
217+ * @param methodName get method with this name.
218+ * @param parameterTypes with these parameters types.
219+ * @return The accessible method.
220220 */
221221 public static Method getAccessibleMethod (final Class <?> clazz , final String methodName , final Class <?>... parameterTypes ) {
222222 try {
@@ -239,8 +239,8 @@ public static Method getAccessibleMethod(final Class<?> clazz, final String meth
239239 * Return an accessible method (that is, one that can be invoked via reflection) that implements the specified Method. If no such method can be found,
240240 * return {@code null}.
241241 *
242- * @param method The method that we wish to call
243- * @return The accessible method
242+ * @param method The method that we wish to call.
243+ * @return The accessible method.
244244 */
245245 public static Method getAccessibleMethod (final Method method ) {
246246 // Make sure we have a method to check
@@ -260,9 +260,9 @@ public static Method getAccessibleMethod(final Method method) {
260260 * the higher level methods.
261261 * </p>
262262 *
263- * @param clazz Parent class for the interfaces to be checked
264- * @param methodName Method name of the method we wish to call
265- * @param parameterTypes The parameter type signatures
263+ * @param clazz Parent class for the interfaces to be checked.
264+ * @param methodName Method name of the method we wish to call.
265+ * @param parameterTypes The parameter type signatures.
266266 */
267267 private static Method getAccessibleMethodFromInterfaceNest (Class <?> clazz , final String methodName , final Class <?>[] parameterTypes ) {
268268 Method method = null ;
@@ -309,9 +309,9 @@ private static Method getAccessibleMethodFromInterfaceNest(Class<?> clazz, final
309309 * Return an accessible method (that is, one that can be invoked via reflection) by scanning through the superclasses. If no such method can be found,
310310 * return {@code null}.
311311 *
312- * @param clazz Class to be checked
313- * @param methodName Method name of the method we wish to call
314- * @param parameterTypes The parameter type signatures
312+ * @param clazz Class to be checked.
313+ * @param methodName Method name of the method we wish to call.
314+ * @param parameterTypes The parameter type signatures.
315315 */
316316 private static Method getAccessibleMethodFromSuperclass (final Class <?> clazz , final String methodName , final Class <?>[] parameterTypes ) {
317317 Class <?> parentClazz = clazz .getSuperclass ();
@@ -331,8 +331,8 @@ private static Method getAccessibleMethodFromSuperclass(final Class<?> clazz, fi
331331 /**
332332 * Gets the method from the cache, if present.
333333 *
334- * @param md The method descriptor
335- * @return The cached method
334+ * @param md The method descriptor.
335+ * @return The cached method.
336336 */
337337 private static Method getCachedMethod (final MethodDescriptor md ) {
338338 if (CACHE_METHODS ) {
@@ -359,10 +359,10 @@ private static Method getCachedMethod(final MethodDescriptor md) {
359359 * This method can match primitive parameter by passing in wrapper classes. For example, a {@code Boolean</code> will match a primitive <code>boolean}
360360 * parameter.
361361 *
362- * @param clazz find method in this class
363- * @param methodName find method with this name
364- * @param parameterTypes find method with compatible parameters
365- * @return The accessible method
362+ * @param clazz find method in this class.
363+ * @param methodName find method with this name.
364+ * @param parameterTypes find method with compatible parameters.
365+ * @return The accessible method.
366366 */
367367 public static Method getMatchingAccessibleMethod (final Class <?> clazz , final String methodName , final Class <?>[] parameterTypes ) {
368368 // trace logging
@@ -461,9 +461,9 @@ public static Method getMatchingAccessibleMethod(final Class<?> clazz, final Str
461461 * Gets the number of steps required needed to turn the source class into the destination class. This represents the number of steps in the object hierarchy
462462 * graph.
463463 *
464- * @param srcClass The source class
465- * @param destClass The destination class
466- * @return The cost of transforming an object
464+ * @param srcClass The source class.
465+ * @param destClass The destination class.
466+ * @return The cost of transforming an object.
467467 */
468468 private static float getObjectTransformationCost (Class <?> srcClass , final Class <?> destClass ) {
469469 float cost = 0.0f ;
@@ -501,9 +501,9 @@ private static float getObjectTransformationCost(Class<?> srcClass, final Class<
501501 /**
502502 * Returns the sum of the object transformation cost for each class in the source argument list.
503503 *
504- * @param srcArgs The source arguments
505- * @param destArgs The destination arguments
506- * @return The total transformation cost
504+ * @param srcArgs The source arguments.
505+ * @param destArgs The destination arguments.
506+ * @return The total transformation cost.
507507 */
508508 private static float getTotalTransformationCost (final Class <?>[] srcArgs , final Class <?>[] destArgs ) {
509509 float totalCost = 0.0f ;
@@ -524,14 +524,14 @@ private static float getTotalTransformationCost(final Class<?>[] srcArgs, final
524524 * This uses reflection to invoke the method obtained from a call to {@code getAccessibleMethod()}.
525525 * </p>
526526 *
527- * @param object invoke method on this object
528- * @param methodName get method with this name
527+ * @param object invoke method on this object.
528+ * @param methodName get method with this name.
529529 * @param args use these arguments - treat null as empty array (passing null will result in calling the parameterless method with name
530530 * {@code methodName}).
531- * @return The value returned by the invoked method
532- * @throws NoSuchMethodException if there is no such accessible method
533- * @throws InvocationTargetException wraps an exception thrown by the method invoked
534- * @throws IllegalAccessException if the requested method is not accessible via reflection
531+ * @return The value returned by the invoked method.
532+ * @throws NoSuchMethodException if there is no such accessible method.
533+ * @throws InvocationTargetException wraps an exception thrown by the method invoked.
534+ * @throws IllegalAccessException if the requested method is not accessible via reflection.
535535 */
536536 public static Object invokeExactMethod (final Object object , final String methodName , Object ... args )
537537 throws NoSuchMethodException , IllegalAccessException , InvocationTargetException {
@@ -553,15 +553,15 @@ public static Object invokeExactMethod(final Object object, final String methodN
553553 * This uses reflection to invoke the method obtained from a call to {@code getAccessibleMethod()}.
554554 * </p>
555555 *
556- * @param object invoke method on this object
557- * @param methodName get method with this name
556+ * @param object invoke method on this object.
557+ * @param methodName get method with this name.
558558 * @param args use these arguments - treat null as empty array (passing null will result in calling the parameterless method with name
559559 * {@code methodName}).
560- * @param parameterTypes match these parameters - treat null as empty array
561- * @return The value returned by the invoked method
562- * @throws NoSuchMethodException if there is no such accessible method
563- * @throws InvocationTargetException wraps an exception thrown by the method invoked
564- * @throws IllegalAccessException if the requested method is not accessible via reflection
560+ * @param parameterTypes match these parameters - treat null as empty array.
561+ * @return The value returned by the invoked method.
562+ * @throws NoSuchMethodException if there is no such accessible method.
563+ * @throws InvocationTargetException wraps an exception thrown by the method invoked.
564+ * @throws IllegalAccessException if the requested method is not accessible via reflection.
565565 */
566566 public static Object invokeExactMethod (final Object object , final String methodName , Object [] args , Class <?>[] parameterTypes )
567567 throws NoSuchMethodException , IllegalAccessException , InvocationTargetException {
@@ -587,15 +587,15 @@ public static Object invokeExactMethod(final Object object, final String methodN
587587 * This uses reflection to invoke the method obtained from a call to {@link #getAccessibleMethod(Class, String, Class[])}.
588588 * </p>
589589 *
590- * @param objectClass invoke static method on this class
591- * @param methodName get method with this name
590+ * @param objectClass invoke static method on this class.
591+ * @param methodName get method with this name.
592592 * @param args use these arguments - treat null as empty array (passing null will result in calling the parameterless method with name
593593 * {@code methodName}).
594- * @param parameterTypes match these parameters - treat null as empty array
595- * @return The value returned by the invoked method
596- * @throws NoSuchMethodException if there is no such accessible method
597- * @throws InvocationTargetException wraps an exception thrown by the method invoked
598- * @throws IllegalAccessException if the requested method is not accessible via reflection
594+ * @param parameterTypes match these parameters - treat null as empty array.
595+ * @return The value returned by the invoked method.
596+ * @throws NoSuchMethodException if there is no such accessible method.
597+ * @throws InvocationTargetException wraps an exception thrown by the method invoked.
598+ * @throws IllegalAccessException if the requested method is not accessible via reflection.
599599 * @since 1.8.0
600600 */
601601 public static Object invokeExactStaticMethod (final Class <?> objectClass , final String methodName , Object [] args , Class <?>[] parameterTypes )
@@ -630,15 +630,15 @@ public static Object invokeExactStaticMethod(final Class<?> objectClass, final S
630630 * </p>
631631 *
632632 *
633- * @param object invoke method on this object
634- * @param methodName get method with this name
633+ * @param object invoke method on this object.
634+ * @param methodName get method with this name.
635635 * @param args use these arguments - treat null as empty array (passing null will result in calling the parameterless method with name
636636 * {@code methodName}).
637- * @param parameterTypes match these parameters - treat null as empty array
638- * @return The value returned by the invoked method
639- * @throws NoSuchMethodException if there is no such accessible method
640- * @throws InvocationTargetException wraps an exception thrown by the method invoked
641- * @throws IllegalAccessException if the requested method is not accessible via reflection
637+ * @param parameterTypes match these parameters - treat null as empty array.
638+ * @return The value returned by the invoked method.
639+ * @throws NoSuchMethodException if there is no such accessible method.
640+ * @throws InvocationTargetException wraps an exception thrown by the method invoked.
641+ * @throws IllegalAccessException if the requested method is not accessible via reflection.
642642 */
643643 public static Object invokeMethod (final Object object , final String methodName , Object [] args , Class <?>[] parameterTypes )
644644 throws NoSuchMethodException , IllegalAccessException , InvocationTargetException {
0 commit comments