Java源码示例:com.google.inject.spi.ProviderInstanceBinding

示例1
/**
 * This is needed for 'initialize(injector)' below to be called so the provider
 * can get the injector after it is instantiated.
 */
@Override
public <B, V> V acceptExtensionVisitor(
        BindingTargetVisitor<B, V> visitor,
        ProviderInstanceBinding<? extends B> binding) {
    return visitor.visit(binding);
}
 
示例2
@Override
public Optional<TypeLiteral<?>> visit(ProviderInstanceBinding<?> binding) {
    // We don't know what the provider will return
    return empty();
}
 
示例3
@Override
public Object visit(ProviderInstanceBinding<? extends T> providerInstanceBinding) {
    processInjectionPoints(providerInstanceBinding.getInjectionPoints());
    return super.visit(providerInstanceBinding);
}
 
示例4
@Override
public Void visit(ProviderInstanceBinding<? extends T> binding) {
    scope(binding, rebind(binding).toProvider(binding.getUserSuppliedProvider()));
    return null;
}
 
示例5
@Override
public Void visit(ProviderInstanceBinding<?> providerInstanceBinding) {
  extractSystemServiceBinding(providerInstanceBinding);
  return null;
}
 
示例6
@Override
public TypeToken<?> visit(
		ProviderInstanceBinding<? extends Object> binding) {
	return null;
}
 
示例7
@Override
public MapBinderBinding<?> visit(
		ProviderInstanceBinding<? extends Object> binding) {
	return null;
}