code: private Class<?>[] getTypes(Object[] args) {
          if (args == null || args.length == 0) {
              return null;
          }
          List<Class<?>> classList = new ArrayList<Class<?>>();
          for (Object obj : args) {
              classList.add(obj == null ? Object.class : obj.getClass());
          }
          return classList.toArray(new Class[] {});
      }
docs: Attempts to determine the argument types based on the passed in object instances.
  @param args assumed not <code>null</code>.
  @return array of argument types.