code: public static Set<Class<?>> find(SoyJavaSourceFunction ssf) {
      FinderFactory factory = new FinderFactory();
      SoyFunctionSignature fnSig = ssf.getClass().getAnnotation(SoyFunctionSignature.class);
      for (Signature sig : fnSig.value()) {
        List<JavaValue> args = Collections.nCopies(sig.parameterTypes().length, FinderValue.INSTANCE);
        ssf.applyForJavaSource(factory, args, FinderContext.INSTANCE);
      }
      return factory.instances;
    }
docs: Calls {@link SoyJavaSourceFunction#applyForJavaSource} with the arity of each supported
  signature to collect the instance classes used by the function.