Java Char Array Create toClasses(final Object... parameters)

Here you can find the source of toClasses(final Object... parameters)

Description

to Classes

License

Open Source License

Declaration

public static final Class[] toClasses(final Object... parameters) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {

    public static final Class[] toClasses(final Object... parameters) {
        if (parameters == null || parameters.length == 0) {
            return new Class[0];
        }/* w ww . jav a2s.co  m*/
        final Class[] parameterTypes = new Class[parameters.length];
        for (int i = parameters.length - 1; i >= 0; i--) {
            if (parameters[i] == null) {
                parameterTypes[i] = null;
            } else {
                parameterTypes[i] = parameters[i].getClass();
            }
        }
        return parameterTypes;
    }
}

Related

  1. toCharArrays(String[] a)
  2. toClassArray(final Object[] args)
  3. toClassArray(Object[] params)
  4. toClassArray(String[] classNames)
  5. toClasses(ClassLoader classLoader, String[] argClassNames)
  6. toClasses(Object[] args)
  7. toClasses(Object[] objs)
  8. toClassesFromObjects(final Object[] params)