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



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