code: public static Class<?>[] toParameterTypes(Object argument)
  	{
  		if(!(argument instanceof Object[]))
  		{
  			Class<?>[] classArgs = {argument.getClass()};
  			
  			return classArgs;
  		}
  		
  		Object[] arguments = (Object[])argument;
  		
  		int len = arguments.length;
  		
  		Class<?>[] parameterTypes = new Class[len];
  		
  		//get array of inputs
  
  		for (int i = 0; i < len; i++)
  		{
  
  			parameterTypes[i] = arguments[i].getClass();   
  		}
  		return parameterTypes;
  	}
docs: ------------------------------------------------