spring-geode/src/main/java/org/springframework/geode/core/util/ObjectAwareUtils.java
/**
	 * Returns a {@link Consumer} capable of initializing an {@link ApplicationEventPublisherAware} {@link Object}
	 * with the given {@link ApplicationEventPublisher}.
	 *
	 * The {@link ApplicationEventPublisherAware#setApplicationEventPublisher(ApplicationEventPublisher)} method is only
	 * called on the {@link ApplicationEventPublisherAware} {@link Object} if the {@link ApplicationEventPublisherAware}
	 * is not {@literal null}.
	 *
	 * @param applicationEventPublisher {@link ApplicationEventPublisher} set on
	 * the {@link ApplicationEventPublisherAware} {@link Object} by the {@link Consumer}.
	 * @return a {@link Consumer} capable of initializing an {@link ApplicationEventPublisherAware} {@link Object}
	 * with the given {@link ApplicationEventPublisher}; never {@literal null}.
	 * @see org.springframework.context.ApplicationEventPublisherAware
	 * @see org.springframework.context.ApplicationEventPublisher
	 * @see java.util.function.Consumer
	 */
Returns a  Consumer capable of initializing an  ApplicationEventPublisherAware  Object
with the given  ApplicationEventPublisher.



@param applicationEventPublisher  ApplicationEventPublisher set on
the  ApplicationEventPublisherAware  Object by the  Consumer.
@return a  Consumer capable of initializing an  ApplicationEventPublisherAware  Object
with the given  ApplicationEventPublisher; never  null.
Returns a Consumer capable of initializing an ApplicationEventPublisherAware Object with the given ApplicationEventPublisher . @param applicationEventPublisher ApplicationEventPublisher set on the ApplicationEventPublisherAware Object by the Consumer . @return a Consumer capable of initializing an ApplicationEventPublisherAware Object with the given ApplicationEventPublisher ; never null .
public static @NonNull Consumer<Object> applicationEventPublisherAwareObjectInitializer(
			@Nullable ApplicationEventPublisher applicationEventPublisher) {
		return applicationEventPublisher == null ? NO_OP : target -> {
			if (target instanceof ApplicationEventPublisherAware) {
				((ApplicationEventPublisherAware) target).setApplicationEventPublisher(applicationEventPublisher);
			}
		};
	}
public static @ NonNull Consumer < Object > applicationEventPublisherAwareObjectInitializer ( @ Nullable ApplicationEventPublisher applicationEventPublisher ) { return applicationEventPublisher == null ? NO_OP : target -> { if ( target instanceof ApplicationEventPublisherAware ) { ( ( ApplicationEventPublisherAware ) target ) . setApplicationEventPublisher ( applicationEventPublisher ) ; } } ; }
Returns a {@link Consumer} capable of initializing an {@link ApplicationEventPublisherAware} {@link Object}
 with the given {@link ApplicationEventPublisher}.
Returns a { @link Consumer } capable of initializing an { @link ApplicationEventPublisherAware } { @link Object } with the given { @link ApplicationEventPublisher } .