Convert argument types to primitive.

@param paramTypes the param types
@param arguments  the arguments
@return the class[]
194610
private static Class<?>[] convertArgumentTypesToPrimitive(Class<?>[] paramTypes, Object[] arguments) {
        Class<?>[] types = new Class<?>[arguments.length];
        for (int i = 0; i < arguments.length; i++) {
            Class<?> argumentType = null;
            if (arguments[i] == null) {
                argumentType = paramTypes[i];
            } else {
                argumentType = getType(arguments[i]);
            }
            Class<?> primitiveWrapperType = PrimitiveWrapper.getPrimitiveFromWrapperType(argumentType);
            if (primitiveWrapperType == null) {
                types[i] = argumentType;
            } else {
                types[i] = primitiveWrapperType;
            }
        }
        return types;
    }
491927
@Override
    protected Object[] convertParameters(Object[] params) {
        Iterator<Object> parameterIterator = Iterators.forArray(params);
        List<Object> converted = parameterConverters.stream().map(parameterBinding -> parameterBinding.convertParameter(parameterIterator)).collect(Collectors.toList());
        return converted.toArray(new Object[converted.size()]);
    }
1222300
def types(*args, **kwargs):
    

    rtype = first(args)

    return Types(rtype=rtype, ptypes=kwargs)
567767
public static Type[] getActualTypeArguments(Type type) {
        Type resolvedType = Types.getCanonicalType(type);
        if (resolvedType instanceof ParameterizedType) {
            return ((ParameterizedType) resolvedType).getActualTypeArguments();
        } else {
            return EMPTY_TYPES;
        }
    }
909326
public static Type[] getTypeArguments(Type type) {
		if (null == type) {
			return null;
		}

		final ParameterizedType parameterizedType = toParameterizedType(type);
		return (null == parameterizedType) ? null : parameterizedType.getActualTypeArguments();
	}
737873
@NotNull
    protected Map<String, Object> toTypeArguments(@NotNull Map<String, ClassElement> typeArguments) {
        final LinkedHashMap<String, Object> map = new LinkedHashMap<>(typeArguments.size());
        for (Map.Entry<String, ClassElement> entry : typeArguments.entrySet()) {
            final ClassElement ce = entry.getValue();
            final Map<String, ClassElement> subArgs = ce.getTypeArguments();
            if (CollectionUtils.isNotEmpty(subArgs)) {
                map.put(entry.getKey(), toTypeArguments(subArgs));
            } else {
                final Type typeReference = getTypeForElement(ce);
                map.put(entry.getKey(), typeReference);
            }
        }

        return map;
    }
1007185
public static Class[] convertToTypeArray(Object[] args) {
        if (args == null)
            return null;
        int s = args.length;
        Class[] ans = new Class[s];
        for (int i = 0; i < s; i++) {
            Object o = args[i];
            ans[i] = getClassWithNullAndWrapper(o);
        }
        return ans;
    }
627466
private static Class<?>[] getTypes(Object... objects) {
        if (objects == null) {
            return new Class[0];
        }

        Class<?>[] result = new Class[objects.length];

        for (int i = 0; i < objects.length; i++) {
            Object value = objects[i];
            result[i] = value == null ? NULL.class : value.getClass();
        }

        return result;
    }
419003
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;
	}
161811
public static InputMapping<?>[] createArrayMapping( Object[] arguments ){
        if( arguments == null || arguments.length == 0 ){
            return null;
        }
        List<InputMapping<?>> list = new ArrayList<>();
        for( Object argument : arguments ){
            list.add( createInputMapping( argument ) );
        }
        return list.toArray( new InputMapping<?>[arguments.length] );

    }
465636
public static Class<?>[] toPrimitiveType(Class<?>[] types) {
		if (types == null) {
			throw new IllegalArgumentException("types cannot be null");
		}

		Class<?>[] convertedTypes = new Class<?>[types.length];
		for (int i = 0; i < types.length; i++) {
			final Class<?> originalType = types[i];
			Class<?> primitiveType = primitiveWrapper.get(originalType);
			if (primitiveType == null) {
				convertedTypes[i] = originalType;
			} else {
				convertedTypes[i] = primitiveType;
			}
		}
		return convertedTypes;
	}
918658
public static Class<?>[] collectArgTypes(final Object[] args) {
        final Class<?>[] result = new Class<?>[args.length];
        collectArgTypes(args, result, 0, 0, args.length);
        return result;
    }
1265695
public Type getType(Type baseType, boolean isArray, List<Type> typeParams) {
    boolean isGeneric = typeParams != null && !typeParams.isEmpty();
    if (!isArray && !isGeneric) {
      // Simple type.
      return baseType;
    } else if (isArray && !isGeneric) {
      // Array type, not generic.
      ClassSymbol arraySymbol = getSymtab().arrayClass;
      return new ArrayType(baseType, arraySymbol);
    } else if (!isArray && isGeneric) {
      // Generic type, not array.
      com.sun.tools.javac.util.List<Type> typeParamsCopy =
          com.sun.tools.javac.util.List.from(typeParams);
      return new ClassType(Type.noType, typeParamsCopy, baseType.tsym);
    } else {
      throw new IllegalArgumentException("Unsupported arguments to getType");
    }
  }
1168083
public Class[] getArgTypes() {
        List<Class> types = new ArrayList<>();

        if (args != null) {
            for (MethodArg arg : args.getArgs()) {
                try {
                    types.add(Class.forName(arg.getType()));
                } catch (ClassNotFoundException e) {
                    throw new CitrusRuntimeException("Failed to access method argument type", e);
                }
            }
        }

        return types.toArray(new Class[types.size()]);
    }
719232
public static Class<?>[] types( TypedArgument... arguments )
    {
        Class[] types = new Class[arguments.length];
        for ( int i = 0; i < types.length; i++ )
        {
            types[i] = arguments[i].type;
        }
        return types;
    }
340769
private static Class<?>[] getParamTypes(Context context, Object... arguments)
    {
        final Collection<Object> params = new ArrayList<>();
        params.add(context);
        params.addAll(Arrays.asList(arguments));
        return UtilReflection.getParamTypes(params.toArray());
    }
58476
private static Object[] getInitParameters(Class<?>[] parameterTypes) {
        int length = parameterTypes.length;
        Object[] result = new Object[length];
        for (int i = 0; i < length; i++) {
            if (parameterTypes[i].isPrimitive()) {
                Object init = ClassUtil.getPrimitiveDefaultValue(parameterTypes[i]);
                result[i] = init;
                continue;
            }
            result[i] = null;
        }
        return result;
    }