code: public static EntityListener newRecursiveEntityListener(final Supplier<EntityListener> supplier, final int depth) {
  	if (depth <= 0) {
  	    throw new IllegalArgumentException();
  	}
  	return new RecursiveEntityListener(supplier, depth);
      }
docs: Creates a recursive entity listener for the supplied entity listener supplier and specified
  recursion limit.
  
  @param supplier
  Supplier of the entity listener to be added to created entities.
  @param depth
  The recursion limit of the listener.
  @return Recursive entity listener with specified recursion limit.