code: public final <T> Function<Object, List<T>> asFunction(final Class<T> resultClass) {
  
          Preconditions.checkNotNull(resultClass);
  
          return new Function<Object, List<T>>() {
  
              @Override
              public List<T> apply(@Nullable final Object object) {
                  Preconditions.checkNotNull(object);
                  return eval(object, resultClass);
              }
  
          };
      }
docs: Returns a function view of this {@code XPath} expression that produces a {@code List<T>}
  result given an input object. If this {@code XPath} is lenient, evaluation of the function
  will return an empty list on failure, rather than throwing an
  {@link IllegalArgumentException}.
  
  @param resultClass
  the {@code Class} object for the list elements of the expected function result
  @param <T>
  the type of result list element
  @return the requested function view