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

The  EnvironmentAware#setEnvironment(Environment) method is only called on the  EnvironmentAware
Object if the  Environment is not  null.

@param environment  Environment set on the  EnvironmentAware  Object by the  Consumer.
@return a  Consumer capable of initializing an  EnvironmentAware  Object
with the given  Environment; never  null.
Returns a Consumer capable of initializing an EnvironmentAware Object with the given Environment . The EnvironmentAware#setEnvironment ( Environment ) method is only called on the EnvironmentAware Object if the Environment is not null . @param environment Environment set on the EnvironmentAware Object by the Consumer . @return a Consumer capable of initializing an EnvironmentAware Object with the given Environment ; never null .
public static @NonNull Consumer<Object> environmentAwareObjectInitializer(@Nullable Environment environment) {
		return environment == null ? NO_OP : target -> {
			if (target instanceof EnvironmentAware) {
				((EnvironmentAware) target).setEnvironment(environment);
			}
		};
	}
public static @ NonNull Consumer < Object > environmentAwareObjectInitializer ( @ Nullable Environment environment ) { return environment == null ? NO_OP : target -> { if ( target instanceof EnvironmentAware ) { ( ( EnvironmentAware ) target ) . setEnvironment ( environment ) ; } } ; }
Returns a {@link Consumer} capable of initializing an {@link EnvironmentAware} {@link Object}
 with the given {@link Environment}.
Returns a { @link Consumer } capable of initializing an { @link EnvironmentAware } { @link Object } with the given { @link Environment } .