private Function<?> newFunction(final Class<Function<?>> clazz,
      final boolean errorOnNoSuchMethod) {
    try {
      final Constructor<Function<?>> constructor = clazz.getConstructor();
      return constructor.newInstance();
    } catch (NoSuchMethodException nsmex) {
      if (errorOnNoSuchMethod) {
        logger.error("Zero-arg constructor is required, but not found for class: {}",
            clazz.getName(), nsmex);
      } else {
        logger.debug(
            "Not registering function because it doesn't have a zero-arg constructor: {}",
            clazz.getName());
      }
    } catch (Exception ex) {
      logger.error("Error when attempting constructor for function for class: {}", clazz.getName(),
          ex);
    }

    return null;
  }
Check to see if the class implements the Function interface. If so, it will be registered with
FunctionService. Also, if the functions's class was originally declared in a cache.xml file
then any properties specified at that time will be reused when re-registering the function.

@param clazz Class to check for implementation of the Function class
@return A collection of Objects that implement the Function interface.
geode-core/src/main/java/org/apache/geode/cache/internal/execute/FunctionToFileTracker.java