@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); } }
@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); } }