blob: 351f0cf6925f29e5b05596f82bbbbe8384f9636d [file] [log] [blame]
/**
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.inject.commands;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.collect.ImmutableList;
import java.util.List;
/**
* Immutable snapshot of a request for injection.
*
* @deprecated replaced with {@link com.google.inject.spi.RequestInjection}
*
* @author mikeward@google.com (Mike Ward)
*/
@Deprecated
public final class RequestInjectionCommand implements Command {
private Object source;
private List<Object> instances;
public RequestInjectionCommand(Object source, Object[] instances) {
this.source = checkNotNull(source, "source");
this.instances = ImmutableList.of(instances);
}
public Object getSource() {
return source;
}
public List<Object> getInstances() {
return instances;
}
public <T> T acceptVisitor(Visitor<T> visitor) {
return visitor.visitRequestInjection(this);
}
}