Example usage for org.apache.commons.lang3 ClassUtils toClass

List of usage examples for org.apache.commons.lang3 ClassUtils toClass

Introduction

In this page you can find the example usage for org.apache.commons.lang3 ClassUtils toClass.

Prototype

public static Class<?>[] toClass(final Object... array) 

Source Link

Document

Converts an array of Object in to an array of Class objects.

Usage

From source file:me.j360.dubbo.modules.util.reflect.ReflectionUtil.java

/**
 * , private/protected./*w ww .jav a  2  s . c o m*/
 * 
 * ???
 */
public static <T> T invokeMethod(Object obj, String methodName, Object... args) {
    Object[] theArgs = ArrayUtils.nullToEmpty(args);
    final Class<?>[] parameterTypes = ClassUtils.toClass(theArgs);
    return (T) invokeMethod(obj, methodName, theArgs, parameterTypes);
}