Java 类com.google.inject.spi.ProviderWithExtensionVisitor 实例源码

项目:guice    文件:ProviderInstanceBindingImpl.java   
@Override
@SuppressWarnings("unchecked") // the extension type is always consistent with the provider type
public <V> V acceptTargetVisitor(BindingTargetVisitor<? super T, V> visitor) {
  if (providerInstance instanceof ProviderWithExtensionVisitor) {
    return ((ProviderWithExtensionVisitor<? extends T>) providerInstance)
        .acceptExtensionVisitor(visitor, this);
  } else {
    return visitor.visit(this);
  }
}
项目:guice-old    文件:ProviderInstanceBindingImpl.java   
@SuppressWarnings("unchecked") // the extension type is always consistent with the provider type
public <V> V acceptTargetVisitor(BindingTargetVisitor<? super T, V> visitor) {
  if(providerInstance instanceof ProviderWithExtensionVisitor) {
    return ((ProviderWithExtensionVisitor<? extends T>) providerInstance)
        .acceptExtensionVisitor(visitor, this);
  } else {
    return visitor.visit(this);
  }
}
项目:google-guice    文件:ProviderInstanceBindingImpl.java   
@SuppressWarnings("unchecked") // the extension type is always consistent with the provider type
public <V> V acceptTargetVisitor(BindingTargetVisitor<? super T, V> visitor) {
  if(providerInstance instanceof ProviderWithExtensionVisitor) {
    return ((ProviderWithExtensionVisitor<? extends T>) providerInstance)
        .acceptExtensionVisitor(visitor, this);
  } else {
    return visitor.visit(this);
  }
}